Introduction to C++

Hello friends, I hope you all are doing great. In today's tutorial, I am going to give you a detailed introduction to the C++ Programming language. In cross-platform programming languages, C++ is the most popular that can be used to work on low and high-level applications. Bjarne Stroustrup was the founder of C++. He modified C language to develop C++ language. Control over system resources and memory can be attained by using C++. In 2011, 2014, and 2017 it was modified to C++11, C++14, and C++17. C++ is a middle-level language. It is advantageous to both programming languages low-level (drivers, kernels) and higher-level applications (games, GUI, desktop apps etc.).

Uses of C++

C++ is one of the world's most famous programming languages. It is used in today's OS, embedded systems and GUIs. It provides a clear structure to programs, permits codes to be reused and lowering development costs as its an object-oriented language. Since it is portable and can be used to create applications that can be used on multiple platforms. It is very easy to learn. As it is close to C# and Java, so switching to C++ or vice versa is very simple.

It is used in

  • Operating systems e.g. Linux-based OS 
  • Browsers like UC browser, chrome, opera and firefox.
  • Games and graphics e.g. Photoshop
  • Clouds like Dropbox
  • Database engines like reedit

Features of C++

Rich library support:

  • It is a simple language as programs can be split into logical units and parts. It has rich library support and many data types.

Platform Dependent and Machine Independent:

  •  It is machine-independent but platform-dependent. It does not run on windows but is executable on Linux.

Middle-level language:

  • It is a middle-level language as we can do both low-level programmings(drivers, kernels, networking etc.) and build large-scale user applications (Media Players, Photoshop, Game Engines etc.) as a high-level language.

3rd party libraries:

  • C++ has rich library support as well as 3rd party libraries (e.g. Boost libraries) for easy, smart and rapid development.

Fast execution:

  • For C++ speed of execution is very fast because it is compiled and highly procedural language.
  • Garbage-collection, dynamic typing etc. slow the execution of the program overall. Since there is no additional processing in C++ so it is fast than others.

Provides direct Memory-Access:

  • It provides pointer support to manipulate storage addresses. This helps in low-level programming ( indirect control over memory addresses).

Object-Oriented language:

  • It is better than C with respect to object orientation that helps it to maintain extensible programs so large-scale applications can be built easily.
  • Its friends and virtual features violate some important rules rendering it a completely object-oriented language.

Amazing facts of C++:

Some interesting facts about C++ are listed below

  • C++ name tells us that C language modified with ++ incremental operator is C++ language
  • The most famous language C ++ is used in commercial software.
  • Four primary features of OOP are supported by C++
    1. Inheritance
    2. Encapsulation
    3. Abstraction, and
    4. Polymorphism
  • From Simula67 Programming language C++ gained the features of OOP.
  • For a C++ program to execute(at least main() function) , a function is the least requirement.

Basic concepts of C++ :

Basic concepts like syntax, variables, loop type etc will be discussed here.

Syntax of C++:

Here is the C++ basic program

#include <iostream.h> using namespace std; int main() { cout << "Hi this is C++"; }
  • iostream is a header file and provides us with input & output streams.
  • namesspace std tells the compiler to use standard namespace. It can be used in 2 ways.
  • the return type of main () is int.
  • count << is used to print anything on the screen.

Comments in C++:

  • // is used to add single comment. For multiple comments /*multiple comments*/ is used

Data types in C++:

There are built-in as well as user-defined data types in C++.

  • In C++, classes are user-defined data types.
  • Built-in data types are int, float, double etc.
  • Derived data types are Array, function, pointer and reference.

C++ Program to get a sum of 3 numbers

//Program to receive three integer numbers and display their sum #include <iostream> using namespace std; int main() {       int num1, num2, num3, Sum;       //variables num1, num2, num3 and sum are declared as integers cout << "\n Enter Number 1: "; cin >> num1; cout << "\n Enter Number 2: "; cin >> num2; cout)<< “\n Enter Number 3: “; cin>>num3; Sum = num1 + num2 + num3; cout << "\n The sum of " << num1 << num2 “ and " << num3 << " is " << Sum; }

Modifiers in C++

In C++, special words(called modifiers) are used to modify built-in data types. There are four main data type modifiers in C++, they are:

  • Long
  • Short
  • Signed    and
  • unsigned

These modifiers are with built-in data types to make them more precise and for expanding their range.

  • long and short modify the maximum and minimum values that a data type can hold.
  • Signed types include both +ive and _ive numbers as is the default type.
  • Unsigned, numbers do not have any sign, so they are always positive.

Variables in C++ :

  • Variable is used in C++ to store any value, which can be changed in the program.
  • Variable is declared in many ways each with different memory location and functioning.
  • It is the name of the memory location allocated by the compiler to the variable.

Variables are divided into two main types,

  • Global Variables
  • Local variables

Global variables

Global variables are those which declared only a single time and used again and again. They are declared outside the main() function. If only declared then assigned different values at different times in program lifetime. But when they are declared and initialized at the same time then they can be assigned any value at any point in the program.

For example: Only declared, not initialized

include <iostream> using namespace std; int x;                // Global variable declared int main() { y=10;                 // Initialized once cout <<"first value of y = "<< y; y=20;                 // Initialized again cout <<"Initialized again with value = "<< y; }

Local Variables

  • Local variables exist only between the curly braces, in which they are declared.
  • Outside the curly braces, they are unavailable and lead to a compile-time error.
Example :
include <iostream> using namespace std; int main() { int j=10; if(j<20)        // if condition scope starts { int m=100;   // Local variable declared and initialized }              // if condition scope ends cout << m;      // Compile time error, m not available here }

C++ Program to find the curved surface area of a cylinder (CSA) (CSA = 2 pi r * h)

#include <iostream> using namespace std; int main() { float pi = 3.14, Radius, Height, CSA; cout << "\n Curved Surface Area of a cylinder"; cout << "\n Enter radius (in cm): "; cin >> Radius; cout << "\n Enter height (in cm): "; cin >> Height; CSA = (2*pi*Radius)*Height;       system("cls"); cout << "\n radius: " << Radius <<"cm"; cout << "\n height: " << Height << "cm"; cout << "\n Curved Surface Area of a Cylinder is " << CSA <<" sq. cm."; }

Output:

  • Curved Surface Area of a cylinder
  • Enter radius (in cm): 7
  • Enter height (in cm): 20
  • radius: 7cm
  • height: 20cm
  • The curved Surface Area of a Cylinder is 879.2 sq. cm.

Operators in C++ :

  • Operators take one or more arguments and generate a new value.
  • For example : addition (+), subtraction (-), multiplication (*) etc, are all operators.
  • These are used to perform different operations on variables and constants.

Errors in C++:

There are three types of errors that occur in C++ programming

Syntax Error:

  • The syntax is a set of grammatical rules to make a program. Every programming language has unique grammatical rules.
  • when grammatical rules of C++ are violated Syntax Errors occur.
  • For example: if you type as follows, C++ will throw an error.

 cout << “Hi welcome to C++”

  • As per the grammatical rules of C++, there should be a semicolon at the end of the statement. But, this statement does not end with a semicolon so Syntax Error occurs.

Logical Error:

It may be happened by the wrong use of variable or operator or order of execution etc. This means that the program is grammatically correct, but it contains some logical errors. So, “Logic Error” is also called Semantic error.

Run time error:

  • During the execution of the program when some illegal action takes place, run time error occurs
  • For example, if a program tries to open a file that does not exist then it will result in a run-time error.

Control Statements in C++:

  • The sequence of flow of instructions is changed by the use of control Statements.

Selection statement

  • Statements can run sequentially, selectively or iteratively in a program. Sequence, selection and iteration processes are handled by every programming language.
  • If the statements are executed sequentially then the flow is called a sequential flow. In some situations, if the statements alter the flow of execution then this flow is called a control flow.

Sequence statement

  • The sequential statement is executed one after the another only once from top to bottom.
  • These statements do not alter the flow of execution and are called sequential flow statements. These statements always end with a semicolon (;).

Selection statement

  • When a condition is provided then selection statements are used.
  • In case when the condition is true then a true block (a set of statements) is executed otherwise a false block is commanded to execute.
  • This is also called a decision statement because it helps in making decisions for the set of statements to be executed.
  • Selection statements are if, if-else and nested if statements.

if statement

  • The general syntax of the if statement is:
if (expression) true-block; statement-x;
  • and flow chart for if statement is

 if-else statement

  • The syntax of the if-else statement is given below:
if ( expression) {       True-block; } else {       False-block; }
  • And the flow chart for if-else statement is:

C++ program to find either number is Even or Odd

#include <iostream> using namespace std; int main() { int Num, rem; cout<< "\n enter a number: "; cin>>Num; rem = Num % 2; if (rem==0) cout<< "\n The given number" <<Num<< " is Even"; else cout<< "\n The given number "<<Num<< " is Odd"; return 0; }

Output

  • Enter number: 12
  • The given number 12 is Even

Nested if

It has three forms
  • If nested inside if part
  • If nested inside else part
  • If nested inside both if part and else part

Iteration statement

  • The iteration statement is a set of statements that are executed again and again depends upon conditions.
  • If a condition evaluates to true, the set of statements (only true) is executed again and again.
  • As soon as the condition seems to be false, the repetition stops. This is also known as looping statement 
  • The set of statements that are executed repeatedly is called the body of the loop.
  • The condition on which exits from the loop is called exit-condition or test-condition.
  • There are 3 kinds of loops in C++
    1. For loop
    2. While loop
    3. Do while loop

for loop

  • The for loop is the easiest loop which allows code to be executed again and again.
  • The general syntax is:
for (initialization(s); test expression; update expression(s)) {      statement 1;         statement 2;       …………. }

C++ program to sum from 1 to 5 using for loop

#include <iostream> using namespace std; int main () { int i,Sum=0; for(i=1; i<=5;i++) { sum=sum+i; } cout<<"The sum of 1 to 5 is "<<Sum; return 0; }

Output

  • The sum of 1 to 5 is 15

While loop

  • It allows the loop statements to be executed as long as the condition is true.
  • The while loop syntax is:
while ( test expression ) {       body of the loop; }
  • Flow chart for while loop is given below

 C++ program to sum from 1 to 6 using while loop

#include <iostream> using namespace std; int main () { int i=1,SUM=0; while(i<=6) { SUM=SUM+i; i++; } cout<<"The sum of 1 to 6 is "<<SUM; return 0; }

Output

  • The sum of 1 to 6 is 21

do-while loop

  • The do-while loop is used as an exit-controlled loop. In a do-while loop, after executing the body of the loop, the condition is evaluated.
  • The do-while loop syntax is:
do {       body of the loop; } while(condition);
  • The flow chart of the do-while loop is shown below

 Examples of C++ programs:

1. C++ Program to find the Total marks of three subjects

#include <iostream> using namespace std; int main() { Int n1, n2 , n3, Sum; cout << "\n Enter Mark 1: "; cin >> n1; cout << "\n Enter Mark 2: "; cin >> n2; cout << "\n Enter Mark 3: "; cin >> n3; Sum = n1 + n2 + n3; cout << "\n The sum = " << Sum; }

2. C++ program to find the Area of a Circle

#include <iostream> using namespace std; int main() { int Radius; float Area; cout << "\n Enter Radius: "; cin >> Radius; Area = 3.14 * Radius * Radius; cout << "\n The area of circle = " << Area; }
So, that was all for today. In the next tutorial, we are going to discuss the Data Types in C++ in detail. If you have any questions regarding this tutorial, ask in the comments. Thanks for reading !!!

How To Get More Subscribers On YouTube: 10 Practical Ways

For the legions of YouTube content creators all competing for attention, the art of attracting more subscribers often feels complicated and mysterious. Successful accounts usually make great videos, but quality alone is rarely enough to reach influencer status.

In this article, we take a look at ten proven and practical ways to get more subscribers on YouTube. Want to buy cheap subscribers and become famous? Read on to find out how to make it happen.

Ask & Receive

One thing that most successful videos do? They ask their viewers to subscribe. You may notice that a lot of your content receives more likes, comments, and views than it does new subscribers. Mysterious? Not necessarily.

Keep in mind that about 5 billion YouTube views take place every day—enough to cover more than half the planet.

The people behind these views are often in channel surfer mode, moving from one video to the next without giving the process much thought. You can get their attention simply by asking them to subscribe at the end of your videos. If they liked your content, this might work!

Take the Marvel Approach

End credit scenes have become a staple of the Marvel Universe, training the audience to sit through endless credits to get a few precious seconds of “secret” content. Your videos won’t have the benefit of a billion-dollar budget and a cast of Hollywood heartthrobs, but they can build anticipation in much the same way.

As you end your video, take a moment to tease what is coming next. This could mean sharing compelling views seconds or even declaring your intention to make new content. Just remember that presentation matters. Your tease needs to be clear enough to hook your audience.

Keep A Community-Driven Mind Set

Another great, though gradual, way to foster a list of subscribers is to interact with your audience. Respond to comments. Be funny, be civil, be present. Not only will a channel with communal aspects draw new subscribers in, but it will also keep your original roster of subscribers thriving.

About 500 hours of content is uploaded to YouTube every minute. You can make sure yours stands out by offering more than just “another video.” People may come for the cat video, but they will stay for the fellowship.

Be Bingeable

For many people, getting on to YouTube isn’t about watching just one video, but many. If your channel is a one-hit-wonder, featuring the occasional good upload but nothing that ties all of the videos together, you may struggle.

Think not just about individual uploads but about playlists, and you might do much better. For example, if you run a cooking channel, you might include a video about beating egg whites into stiff peaks. You might then follow that video on a playlist with another video that contains stiff egg whites in the recipe. Next might be a good dish or dessert.

Good playlists follow a logical pattern that keeps the audience watching.

Arrange Your Content Intelligently

Oddly, the majority of web viewers spend most of their time looking at the left-hand side of the screen. While there is no obvious explanation for why this is, it does serve as a helpful way for you to maximize the effectiveness of your channel layout.

As you arrange your videos on your YouTube homepage, think about ordering your content in such a way that the most compelling uploads are the easiest for potential viewers to spot. Unable to distinguish in such a way? No problem. Your existing audience already has. Make your most popular videos as viewer-facing as possible, and you’ll draw more people in.

Time Your Uploads

Did you know that most people are on the internet in the mornings and afternoons? The pattern likely mimics (at least to an extent) the typical school and work hours, showing that people gravitate towards YouTube during their time off.

Whatever the reason, timing your uploads to make them sync up with when people are most likely to be at their screens will help your content reach a broader audience. To this end, YouTube analytics maybe your best friend. Averages are great, but analytic software can offer a much more precise idea of when people tend to view your content.

Be Regular

The Simpsons wouldn’t be going on its thirtieth season if no one ever knew what time it would be on. Can you imagine a television show airing on Tuesday night one week, Friday morning the next, followed by Saturday around noon? No one would ever know when to park themselves on the couch, and the show would fail.

The same can be said of YouTube. While streaming is obviously a little different than watching network television, the fact remains that if people don’t know when your content will be uploaded, they will probably stop paying attention eventually. Being consistent with your uploads makes it much easier for subscribers and potential subscribers alike to find your stuff.

Networking

If you’re like most content creators, you probably have not just a YouTube account but also memberships with all of the major social media platforms. It’s essential to use those other accounts to draw traffic to your videos.

Fire off a tweet every time a new video goes live. Interact with your fans, post regularly, and make yourself accessible. The more visible you are online, the more views, and eventually, subscribers, you will get.

Tags

YouTube, like all social media, thrives on tags and descriptions. The words you choose to accompany your uploads will have a considerable influence both on who finds your content and on what they think of it when it comes to their attention. Be mindful, be clever, be accurate in how you represent your uploads—tags matter.

Buy Subscribers

Last but not least, buy some subscribers. While paying for your audience is somewhat taboo in the internet world, it’s actually a highly effective marketing technique that many content creators take advantage of.

Buying from responsible vendors is a safe and dependable way to maximize the value of your channel in the eyes of the YouTube algorithm.

Remember that YouTube prioritizes showcasing content that already has the appearance of being famous. By purchasing subscribers, you make sure your content gets seen by real potential subscribers.

You also just make your content more appealing to your potential audience.

If there are two similar channels out there, most people are going to choose the one that has the most subscribers. By purchasing some, you ensure that this will be you.

Making a Career Out of a Hobby in Engineering

Engineering is one of the areas in your life that you really enjoy. Taking on new projects, getting them working, and then getting them operating as they should is what you are passionate about. For as long as you can remember, you have been passionate and interested in engineering, but have you ever thought seriously about turning it into a career? Engineering careers, whether in the consumer sector or in the B2B sector, are highly sought-after roles. Getting qualified and developing your skills along the way is important to make the transition from hobby to career, but what else should you be thinking about?

Turning Your Passion into a Career

When you turn your passion, or your hobby, into a career, it can feel fantastic, but it can also feel like a time that is filled with self-doubt and worry. Worrying that you have the right skills and knowledge base to carry out projects and ensuring that you see projects through are probably two of your main concerns right now. When engineering is a hobby, you have no real-time limits or pressures to perform. You have your free time to fiddle and change bits of a new machine or piece of equipment you are working on. You also don’t have to worry about having the right skills or knowledge as nobody is judging you or even watching over you, so if you make a mistake, then you don’t need to worry, as who is there?

However, when you turn your passion into a career, you have a new set of worries and concerns. Of course, over time, these will disappear, but, to begin with, they can feel all-consuming. So, just how can you make the transition from hobby to career as easy as possible? Well, to begin with, you need to remember your passion at the heart of everything you do. Yes, your engineer feats will be judged, and, yes, you will have time pressures and deadlines to adhere to. However, if you maintain your passion through every project you undertake, you will make the transition from hobby to career success and relatively easy. Removing unnecessary pressure and stress will be beneficial to you, and it will ensure that you still remain passionate about every project you undertake.

Going About Things the Right Way

Just like when you start a new project or test, there is a right way to go about things and an incorrect way to go. When you start out on the road to a career in engineering, it is crucial that you go the right way. The right way involves gaining more experience, and it also involves studying and getting qualified. Yes, you might have been working on projects and plans since you were little, but as good as being self-taught is, it is not always what future or potential employers want from you. When you commit to studying an engineering degree, you learn new ways to begin and undertake projects, and you also learn about industry standards.

If you do not commit to getting a formal education, then you may struggle to land and even secure a job in engineering, simply because there are industry standards that need following, and if testing, production or manufacturing, veers off from these industry standards, results could be different, and your employees or the ones who have commissioned your project could be left in a difficult position, especially if you have not followed the correct procedures and rules. Going about things the right way or in the correct manner may feel different for you, but if you commit to studying and you commit to learning in a structured environment, then you should have no trouble adapting your styles and ways of working.

Studying and Getting Qualified

When it comes to studying and getting suitably qualified, it is important to weigh up all of your options. You need to begin by looking at reputable and respected universities, and then you need to establish just what you would like to get qualified in and why? Choosing the right educational institute or university is crucial. You want to ensure that you are getting an education that is valued and also respected. A university with an outstanding reputation and one that provides flexible learning opportunities would be the best route for you to take. As where you study is just as important as what you study, it is of paramount importance that you take your time to choose the correct establishment for you and your requirements. Weighing up the pros and cons for a select number of universities will allow you to narrow down your list significantly.

Just as you have taken a methodical approach to choose a university, it is also crucial that you take a methodical approach in establishing what you want to study. So, what area of engineering are you looking to be part of when you finish studying? Do you want to be within the developing stage, or would you prefer to be in the operations department? For example, if you want to be in the operations department or area, then you will need to study a suitable degree, such as an operations management degree because this will provide you with all of the information, and knowledge you need to carry out the role successful. If you do not study for a degree that is related or even relatable to what you want to do, then you will struggle to land the job you want, and you will struggle to get the satisfaction out of any role you undertake.

Having a Plan of Action

Once you have decided which university you want to study at and you have decided which degree to pursue, you must now formulate a plan of action that will help you get the career you want. Without a plan of action, you may find it difficult to find a job with a company you want, and, as a result, you may have to settle for something less than you deserve. So, to begin with, your plan of action needs to have a timescale. If you are working on an infinite timescale, then you will find that you will never apply yourself as well as you can! So, aim for a 3-4 year timescale, and this way, you have ample time to complete your studies, and you have enough time to start seeking out opportunities.

As well as planning out your studies, you also need to have an action plan for gaining some experience. To gain suitable and relevant experience, you need to get some suitable and valuable work experience. When it comes to finding suitable work experience, it is worth looking both local, and further afield at engineering, and manufacturing businesses. Gaining work experience, even if it is irregular and just a few hours here and there will benefit you and will help you in the long term. Learning how engineering businesses operate and function is crucial so that you can understand how your future role fits into everything that happens, perhaps on a daily or weekly basis.

The Growing Demand for Engineers

Engineering has shortages, and it has demand, and these are unfortunately widespread. As older engineers are retiring, there are not enough suitably qualified or experienced engineers to take over, and this then leads to huge gaps within the workforce. Skills shortages, and shortages within minority groups, such as female engineers, mean that engineers are always in high demand. Building up your experience and your knowledge is crucial because experienced engineers will command more interest, and in return, you will be well remunerated and compensated. As businesses and industries change how they work and how they operate, the demand for engineers will continue to grow.

Due to the demands for engineers, businesses do compete, and they will compete for you once you have the correct qualification and education under your belt. Jumping at the first opportunity that comes your way is often not very beneficial, and this is important to remember, especially in an industry where they are shouting out for new people. Evaluating every opportunity on offer and selecting the right one for you that matches your views and your ways of working is crucial. Remember that being in demand within an industry can, unfortunately, come with its downsides, and one of these can be located. There are opportunities available all across the country and even across the world, but that does not mean that there will be a suitable vacancy available for you near to your preferred location. You may have to travel where the work is, and this is something that you should start planning for and preparing for as soon as possible. Planning and preparation will make it more comfortable and more enjoyable.

Changing Your Mindset

It can be difficult to change your mindset and to change your way of thinking, especially if you have been used to doing things in a certain manner for a period of time. However, when you are approaching new opportunities and you are putting your skillset to use every day, you must ensure that your mindset matches that of the company or business you are working for. If your mindset is different, or if it is not in line with how your employers want to proceed in the future, then you can struggle to hold down a suitable position. A positive mindset, and a mindset that is highly adaptable, is one that you should look at adopting, and although this might be a bit of an alien concept to you right now, you will see just how important a collaborative and cohesive mindset is amongst employees, and employers, especially when undertaking new projects and assignments.

Attributes and Skills of Good Engineers

Of course, all engineers are different, and they are all individuals. However, they all share a lot of attributes and skills which make them good engineers. So, do you share any of these attributes?

  • Creativity - You have to be creative to solve a problem or to put your plans and ideas into action. If you cannot think creatively, then you cannot see a solution or a resolution to a problem, and this could be a sticking point,
  • Positivity – A positive mindset and a positive approach to working are crucial. If you cannot maintain a positive mindset or approach, then you can struggle to get the answers and solutions you need, and you can end up letting your frustrations stop you and even hold you back from achieving what you know you are capable of.
  • Critical Thinking – Thinking quickly and applying critical thinking to those highly stressful times and situations is essential. Being able to think clearly, even in times of pressure and stress will help you solve problems and find a solution quickly.

Don’t panic if you do not have the time to change and tweak how you handle or approach situations, and you have time to adopt the correct mindset.

Seeking Out Opportunities

Now you have evaluated your skills and your attributes, and you have a strong and solid education behind you, it is time now to start seeking out opportunities. Finding new work placements and opportunities can be easy if you adopt the right mindset. When you are starting out and you are looking for new opportunities, you need to be open to working in different locations, and you even need to be open to working on short-term projects to build up experience. Finding opportunities online, approaching companies and businesses offline, and even signing up for job agencies will help you to get work that suits you. You may need to make compromises when you start out, and as you are building up your experience and connections, but if you persist, and if you remain open and flexible, then you should have no trouble in landing a position that suits you and that allows you to turn your passion and hobby into a career.

An Overview of Content Scraping Protection

Do you care about SEO? Then you must protect your content from scrapping. You can lose the competitive advantage and revenues to content scraping. Google can penalize you if they detect that your content is plagiarized. You can incur losses in your website traffic up to 99%. Since content is the primary driver of traffic and sales, protecting it from scrapping and others increases your sales and boost your SEO. Content scraping is carried out by bots called scrappers controlled and commanded by a cybercriminal. Scrapper bots repurpose the scrapped content to malicious actions. These actions include copyright violation, duplicating the content to an attacker’s website, and stealing organic traffic. To understand how to protect yourself from scrapping, let us first understand how the bots scrape content.

How is content scrapped?

A scrapper bot sends a sequence of HTTP GET requests to a web server. It then copies all the information sent in response and saves it. It repeatedly does this until all the content has been scrapped.

Scrappers can use JavaScript to download gated content or fill out every form on a website. The automation in browser programs and APIs allow the automated bots to interact with online infrastructures as they apply the traditional web browser techniques. They effectively trick the computer into thinking that the user accessing the content is a human.

The last way that content may be scrapped is by the actual user. They can decide to go through all your content and copy what they find useful or everything within a website. Unlike bots that do this in a matter of seconds, human beings can take days or hours exposing themselves to the risk of detection.

Why do scrappers steal your content?

There are various motives that an attacker may have to scrape your website content. The baseline is that scrappers can monetize your content or generate more traffic to them. Below are the main reasons for content scraping?

To generate leads

When an attacker is part of a small community and wants to seem like leaders in their field, they result in scrapping related content. When you search for an established company, you end up on their site because they have scrapped its content. This is called lead generation. It is common in legal practice and upcoming businesses.

Advertising revenue

Other people may have good intentions, like creating a knowledge hub—a one-stop place for users in a specific field. When you catch them in action, the reply is that they were doing it for the good of the community.

Commissions from affiliate marketing

Some other attackers use your content to make a few extra dollars through affiliate marketing. They combine the scrapped content with driving search engine traffic to their websites. These websites are usually used to promote certain products.

Techniques for content scraping protection

Content is at the heart of any online business. Therefore, you need to take proper care. By adopting measures to protect the content, you protect your business from the related risks and defend the reputation of your brand. When scraped, they post your content elsewhere. Among the other ways, Really Simple Syndication (RSS) is the most commonly used scrapping method. With all the risks and disadvantages of content scrapping in mind, you must take adequate measures to protect your website. Below are some of such measures.

Limiting the access to a post

Many websites allow uninhibited access to articles and website posts to ensure that society is well informed. Unfortunately, the scrapping bots and attackers take this opportunity to scrape the data. By allowing access to only a few lines or paragraphs, you ensure the attacker has bits of information that they cannot use. This frustrates them as attackers as they cannot use your quality content. To access the rest of the content, you can ask a user to create an account and log in or subscribe by paying cash. These methods will help identify if the user is a bot or an actual human being while protecting your content from scrappers. If it is a bot, they will not pay the cash but may create the account and log in. Therefore, it is advisable to implement the two measures together.

Protection by using the CAPTCHA

A CAPTCHA is a Turing test designed to tell between humans and bots. They are easy enough that any average human can answer while remaining complicated for the other computers and computer programs like bots to fill. A CAPTCHA can help you protect content scrapping by blocking the suspicious bot areas. They come in various forms, including invisible CAPTCHA, confident CAPTCHA, math problems, entering the characters on the screen, honeypot CAPTCHA, among other CAPTCHA solutions. While security researchers hint they are ineffective in protecting your content from malicious bot actions, they also advise that it is better to have them installed. The only limitation of various CAPTCHA implementations is that they influence a user’s experience negatively.

Protection through traffic monitoring

Through monitoring traffic, you can ensure that all the traffic comes from legitimate sources. If any originates from a suspicious source, you can take measures to investigate and eradicate them. Besides helping you protect your content from scrapping, traffic monitoring helps identify other issues that may pose a threat to your content. They include a denial of service, account takeovers, and scalping. In this method, you can identify the sources and block them. These block any further encroachment of your content by these scrappers.

Adding links to your content

To save your content from scrapers, you can add links within it. This is an easier way to protect your content. When a scrapper copies the content, they leave the links intact. While this protects it, linking the keywords makes your content more engaging to the users. Plugins that enable customizations in RSS feeds, and HTML codes can accomplish this. This ensures that when the attacker posts your content on their website, users get redirected to your site when they click the content and keywords.

Rate limiting

Bots browse the web pages incredibly fast. Because they have to complete the actions first before they are detected, they leverage speed as one option to remain invisible.

Therefore, they can access over 50 pages in seconds. The number of incoming requests when such an activity is detected can help protect your content from scrapping. Besides scrapping protection, limiting the access rates can also prevent a more DDoS attack.

Protecting your content using a bot management solution

Because the attackers use modern techniques when developing the scrapping bots, you also have to match the response by bringing the big guns. Bot management solutions are sophisticated modern utilities that also use modern methods to ensure the safety of your content from bot activities. They differentiate the legitimate bot from a malicious one and take measures to ensure your website, mobile application, or API’s security is fortified. Such solutions like DataDome analyze every request to an API, website, or Mobile application for various bot activities in real-time. When they detect a threat, they use all measures to protect and safeguard the integrity of your content. Besides content scrapping protection, DataDome protects you from other OWASP Automated Threats (OAT).

Other measures include; setting Google alerts when a person tries to copy your content, embedding the content into a media and regularly changing the HTML markup.

Conclusion

Bot developers devise new ways and tricks to develop stealthy bots that are more efficient daily. Therefore, the risks associated with bot activity will not go away in a jiffy. It is for this reason that you need to put mechanisms to protect your content from scrapping. Though no one technique guarantees 100% safety, using a bot solution like DataDome gives better results because it is a real-time tool for bot management.

ESP8266 – Serial Communication

Today we will talk about an extremely powerful tool in the use of microcontrollers. The Serial communication, specifically the USART (Universal Synchronous Asynchronous Receiver Transmitter) standard. The system works using two wires. RX (Receiver) and TX (Transmitter), connecting two devices. The RX of one is connected to the TX of the other. If the choice is for a synchronous connection, it may be necessary to add one or two more pins to operate as a “traffic light”. But most current microcontrollers can operate asynchronously, which saves us the expense of pins. Data is sent, as the name implies, in a series of bits. ESP8266 provides us with two ports, one of them converted to USB in the NodeMCU module.
Where To Buy?
No.ComponentsDistributorLink To Buy
1ESP8266AmazonBuy Now

Applications

The range of uses of serial communication is limited only by creativity. Here I will mention three more general scenarios and detail some applications within them.

1. Communicating with computers

With a USB cable, we were able to connect the NodeMCU with a computer via Serial. Arduino IDE already gives us the first use. With Serial Monitor, we can send commands or debug the functioning of our code. But the integration with other software is pretty powerful. Imagine, for example, access control in which a circuit with ESP8266 reads an RFID card and sends it via Serial to a Permission Validation System. Or even an LED panel that receives a software display text.

2. Communicating with microcontrollers

Probably the most common application. Whether to integrate into a preexisting circuit or to distribute functionality between microcontrollers. This integration can be done between different microcontrollers. As long as they operate with the same voltage (3.3V) or use a level converter. An application example is to integrate the ESP8266 wifi with the analog ports of an ATMEGA328 to build an IoT toxic gas sensor. We already know that the ESP8266's analog port is quite inefficient. Then it is possible to perform the analog reading on the ATMEGA328 and send the information to ESP8266 by Serial.

3. Communicating with industrial machines

This, without a doubt, is the most interesting way to integrate industrial machinery with WEB systems. The older industrial equipment that allows some automation, provides RS232 or RS485 ports for integration with PLCs. In these cases, the commands are pretty plastered, but hopefully, well documented. The voltage level is 12V or 24V, but there are converters and logic levels to solve this. The industry 4.0 paradigm has been operating to make this kind of integration. Some PLCs are already developed with wifi modules. And on that account, circuits with the ESP8266 have the immense advantage of low cost. The vision behind this is to be able to remotely monitor or control an entire industrial plant. Tracking KPIs for predictive maintenance, doing recalibrations, and managing production.

Main Functions

The Serial library has a good variety of functions for Serial communication, but most are for very specific uses. We will discuss the most common ones and may return to others in the future as needed by the projects.

Serial.begin()

The first function to be used. It initializes Serial communication informing the data transfer speed (in bits per second) and, optionally, a configuration parameter. By default, Serial is configured to send data in 8-bit packets plus a terminator, not including parity. The best way to imagine this communication is to imagine a train, where each byte (8 bits) sent is a car, and the terminator is the connection between them. This standard is used in most devices, but if you need to integrate a device with another standard, the config parameter allows you to change the number of bits in the packet (from 5 to 8), the number of stop bits (1 or 2 ) and enable or disable parity (a packet integrity check). The speed uses some preset values. The fastest that remains stable for the ESP8266 is 115200 changes per second. So we could start with: Serial.begin(155200) The function below presents the same result, making the config parameter explicit. Serial.begin(115200, SERIAL_8N1)

Serial.available()

The function returns an integer with the number of bytes available in the read buffer. The maximum of bytes in the buffer is 64. This function is very useful for monitoring incoming information. Value = Serial.available()

Serial.read()

The function returns the most recent byte in the input buffer and removes it from the buffer. It is ideal if your communication is byte-to-byte. For example, if you are receiving input from a keyboard, the function would return the key you typed. It returns an integer with byte or -1 if no data is available.

Serail.readString()

This function is best suited for reading strings. Like words. It is the equivalent of calling the read() function continuously until it reads all the information from the buffer. The function returns a string with the data.

Serial.print() and Serial.println()

The two functions are very similar. It takes a value and sends it serially in ASCII format. It is also possible to define the numerical base before sending (binary, decimal...) and the number of decimal places. The function can be used either in the format: Serial.print(value) And the format: Serial.print(value, format) The table below presents some usage examples. The println function works pretty much the same, but it adds the return character ‘\r’ and newline ‘n’ at the end of the packet. It's the equivalent of typing in a text editor and pressing the "Enter" key.

Serial Monitor

The Arduino IDE provides a very powerful tool for debugging and testing Serial communication. The Serial Monitor. The tool is pretty intuitive, but let's take a look at its fields.
  • Sending data: This allows us to send commands directly to the microcontroller
  • Autoscroll: Very useful when we've already received enough information to fill the screen
and don't want to move it down manually.
  • Terminator: Choose whether or not to include the new line and carry return characters at the end of the message before
  • BaudRate: Defines the communication It must be the same as the microcontroller, or
packet loss or character misreading problems will occur.

Controlling and monitoring an LED

Let's make a simple code to control and monitor the NodeMCU LED from the Serial monitor. The code will monitor the Serial, and each time it receives the command “ON”, it will turn on the LED, when it receives “OFF”, it will turn off the LED when it receives “STATUS”, it will return the status of the LED in the Serial. We will create three functions to perform the actions.
  • turnOn() : To turn on the
  • turnOff() : To turn off the
  • statusLED() : To read the pin status and return information in the serial.
We initialize the Serial in the Setup function. In the loop() function, we check if there is any data in the input buffer of the serial, if there is, it saves the buffer values in the variable “payload”. Finally, we check the payload value to decide the action. Here it is important to note that we use an equality comparison and that “ON” is different from “ON “. For this reason, when sending the information through the Serial Monitor, we choose the “No line ending” option. And so is our final code. Compiled, written to nodeMCU. Open the Serial Monitor, remember to put the correct baud rate and the "No Line ending" and send one of our 3 commands. This is simple code, but very powerful. So, that was all for today. I hope you have enjoyed today's tutorial. If you have any questions, please ask in the comments. Thanks for reading.

Skills & Attributes Needed In Engineering

If you are planning on a career as an engineer, it is important that you are aware of the various skills and attributes that employers look for. This is a terrific field to work in with highly rewarding and valuable work, high earning potential, and great job opportunities, but this is also one of the more challenging industries to crack, and there are many skills and attributes that are required. These are skills and attributes that can be developed, though, so if you lack in any, then you should be able to find ways to develop and improve. Read on to discover the skills and attributes that employers are looking for in engineering.

Hard Skills

Obviously, hard skills are essential in a field that is so technical. The hard skills that you need will depend on the field of engineering that you are entering but could include skills such as:

  • Programming
  • Computer science
  • Statistics
  • Structural analysis
  • Data modeling
  • System design and analysis

These are hard skills that you can learn in school or teach yourself. These are hard skills that need to be strong skills, so you need to really focus on these areas and ensure that you have a high level of knowledge when looking to enter the field.

Problem-Solving

Engineering is, essentially, problem-solving, so it is vital that you are able to assess situations, determine problems and find the best solutions. There are many issues and problems that can arise during a project, so employers will want to see that you are able to solve problems effectively and efficiently. You can develop your critical thinking skills to become a better problem-solver and find the best solutions to issues that you might face.

Teamwork

Engineering is all about teamwork, so you need to be able to work with others and understand the importance of playing your role. Engineers rarely work alone, and you will usually be working with colleagues and other professionals, so it is important that you are a team player and a strong communicator in order to find success and to stand out to employers.

Communication Skills

Leading on from this, engineers need to have strong communication skills, and this is sometimes an overlooked aspect. Having hard skills is vital, but you will not get very far if you are not a good communicator as you will constantly be talking to people throughout the day. You need to be able to listen to the needs of the client, clearly present your ideas, work as part of a team and also be capable of leading on projects.

Additionally, having good communication skills will help you to develop a positive reputation and form strong relationships. As with any industry, this is crucial for getting ahead and finding new opportunities. It is true that some people are better communicators than others, but it is possible to improve your communication skills with research and practice, and this should improve your life in many ways.

Project Management

You also need to be able to manage projects if you want to rise to leadership positions in engineering. This will involve managing teams and integrating external professionals while delivering projects on time and within the pre-agreed budget. Project management is a difficult skill to master, which is why many aspiring engineers find it useful to take project management training. For engineers, Six Sigma training is popular and will help to develop the project management skills that you need to find success in engineering.

Innovation

In order to find success in engineering, you need to be innovative and creative. Engineering is always about improving and making things better, so you need to be able to innovate and use creativity to constantly be improving and coming up with the best solutions. In order to be innovative, you need to think outside of the box, stay current with technology, continue to learn, and constantly push yourself to think bigger.

Attention To Detail

Engineers need to be able to see the big picture and be innovative, but you also need to have excellent attention to detail. It is often the small things that matter in engineering, as a slight miscalculation can cause the whole project to fail, and this could even cost lives. This is why you need to be meticulous in your work and take pride in your attention to detail. In order to be meticulous in your work, you need to have high concentration levels and be able to focus intensely. This also means that you need to know how to disconnect from work, recharge your batteries and unwind so that you can give it your all each day.

Engineering Management

If you have aspirations of climbing the ladder and rising to leadership positions, you need to have specialist engineering and management skills that will help you to lead teams, deliver projects and run a profitable business. You can get a master's in engineering management at established schools like the University of Ottawa, and this will teach you all that you need to know to excel in engineering management. You will learn about key aspects such as budgeting and finance, people management, leadership, product innovation management, AI-driven decision making, and operations management, just as a few examples.

You can also earn a masters in engineering management entirely online. This can make it easier for people to fit into their lifestyle and allows you to start using what you learn straight away to stand out and start to climb the ladders.

Committed

Engineering does not work that you can succeed with if you are not committed. With engineering projects, you may have to spend long periods of time away from home and be on call 24/7, so it will inevitably have a big impact on your lifestyle. This means that you need to be committed to the cause and willing to put your job first. Working as an engineer will have an impact on your personal life, but it is also working that is hugely rewarding and can be lucrative, so this is something that you will need to weigh up. While it can be demanding, you may also benefit from quieter periods where you can spend much more time at home and with loved ones too.

Resilience

Another part of the job that you need to be prepared for is setbacks. When you are working on a major project with lots of moving parts, it is inevitable that there will be setbacks along the way. This can be incredibly frustrating, so you need to be resilient in order to not allow these setbacks to put you off and so that you can simply continue working and find the best solution to keep the project moving forwards at all times.

Pressure-Management

Leading on from this, you also need to be able to handle pressure and be able to work to a high standard in stressful situations. Working on large projects involving lots of money and tight deadlines creates tense working conditions, and you will have people breathing down your neck, so you need to be able to handle this and prove yourself to be reliable under stress. This is something that is developed with experience, but you can also develop your abilities to work under pressure by improving your work ethic, setting yourself targets, and breaking tasks down into smaller tasks.

Commitment To Learning

Even with a master’s in engineering management, there is still a lot to learn, and you need to be committed to learning in order to find success as an engineer. This is because this is a field that is constantly going through change, so you need to be able to stay current and up to date with the latest trends and technological developments. You can do this by attending industry events, networking, reading publications, taking further courses, engineering blogs and podcasts, and research.

Positive Mindset

Finally, you will need a positive mindset if you want to be an engineer. You will be facing a lot of negativity in your work with setbacks, stressful working conditions, and tight deadlines, so you need to be able to maintain a positive mindset and this is something that employers will always be looking for. Those with a positive mindset will be able to stay motivated, work to a high standard each day and help to lift the overall atmosphere. Crucially, to have a positive mindset, you need to be able to lead a healthy lifestyle, switch off after work and find ways to enjoy yourself. Having a positive mindset also requires being in the right job, so if you find that you are not happy in your work, then you may want to consider a change.

These are the main skills and attributes that are needed to find success in engineering. If you do not possess these, they can be developed, and it is worth the effort as this will help you to stand out to employers and find work.

ESP8266 – Knowing the NodeMCU GPIOs or Pinout

Where To Buy?
No.ComponentsDistributorLink To Buy
1ESP8266AmazonBuy Now

Introduction

When the subject is ESP8266, it is normal that our attention is on the Wifi module. We've already discussed some applications in previous articles, and there's still a lot of cool stuff to see in the future. We've looked at how the ESP8266 communicates with the world via wifi, and now we'll look at how it does it through its pins.

We will make a decision here. The ESP8266 is found in several modules. Each module with its pin provision. ESP-12 modules provide the most features. To make better use of these features and have a more protoboard-friendly module at hand, we will analyze the NodeMCU module with the ESP-12E.

Overview and Electrical Data

The NodeMCU pins are available in two rows with a spacing that allows them to fit on a breadboard (in particular, I find the pins a little thicker than they should be, and I think if they had more length and less width, it would be even more efficient).

  • The NodeMCU interferes just a little with ESP-12 pins. It does an untreated exposure of each of them.

It is interesting to see what NodeMCU adds or changes to the ESP-12.

Power Source

ESP8266 operates on 3.3V, ESP-12 exposes the VDC pin for direct power. The NodeMCU incorporates a voltage regulator (usually the AMS1117) that can receive a 5V to 10V input and deliver a stable 3.3V supply to the ESP-12.

But what advantage does this give us? nodeMCU is a development module. Choosing pins that fit the breadboard shows us this. Being able to receive 5V greatly increases the practicality of the power supply. 5V is the standard used on USB, so even a cell phone charger can keep everything running.

The power can be supplied directly via the USB connector (standard USB = 5V) or the Vin pin (5V to 10V). The regulator provides a maximum of 500mA.

The pins involved in the power are:

  • Vin: Positive voltage Operates with voltages from 5V to 10V.
  • GND (G): Reference voltage for voltage input and
  • 3V (3V): Output voltage with a value of 3.3V
  • VU: On some models, this pin is not connected to But Lolin's V3 model provides a 5V output provided directly by USB.

Some important considerations to keep in mind:

  • The 3V3 regulator provides a maximum of So be careful what you feed the 3V3 pins.
  • The Module can be powered by either USB or Vin But it is not recommended that it occur for both at the same time.

Serial – USB Adapter

The ESP-12 provides us with two UARTs, with UART0 (pins RXD0 and TXD0) being used in programming. The NodeMCU Module integrates a Serial-USB converter that greatly facilitates our work.

The USB connector can be used for power and data communication via Serial. For this reason, it is a sufficient condition for recording the ESP8266.

A point of attention here: The RXD0 and TXD0 pins are available as GPIO pins (respectively GPIO3 and GPIO1). But they need to be used very carefully. Enabling these pins as GPIO disables USB.

Digital Pins (GPIO)

Digital pins or GPIO (General Purpose Input Output) are pins intended for binary control. It can have a HIGH or LOW state and can operate both, as an input (for reading digital states) and as a digital control (turning on LEDs, for example).

If you take a look at the nodeMCU image, you will notice that it talks about 13 GPIOs (From GPIO0 to GPIO15). So we have 13 pins for input and output control? Not exactly.

Most microcontroller pins have more than one function, this function is defined through registers. In the case of NodeMCU, some GPIOs are already in use. And if we configure it as a digital pin, we lose some functionality.

Let's look at it on a case-by-case basis:

  • GPIO4 and GPIO5: Starting with the easiest. These two have only the GPIO function. It can operate as Input or Output.
  • GPIO0 and GPIO2: These pins play a very specific role in the ESP8266 startup. For that reason, they can only operate as
  • GPIO1 and GPIO3: As we have seen, these pins are used by USB so they are not recommended for use as GPIO in
  • GPIO9 and GPIO10: ESP8266 uses an external FLASH memory chip and communicates with it with a 4-bit SDIO interface. These two pins are on the list. By default, both are used in this But it is possible to set it to 2-bit mode and release these two pins. You gain in the number of pins, but you lose in memory access speed.
  • GPIO12, GPIO13, GPIO14, GPIO15: These pins can be used in other modes, but by default, they are free GPIOs for use as Input or

Ah, an important point to mention: ESP's GPIOs operate at 3.3V.

Analog Pinout

The Esp8266 only provides one analog input (ADC0 pin), and that's probably its biggest weakness.

Although the module operates with 3.3V, the analog input operates from 0 to 1V. Which significantly limits the resolution.

Main functions for GPIO in the Arduino IDE

To control the GPIOs, the Arduino IDE provides us with some functions. Among the main ones, times:

pinMode(pin, mode)

pinMode() defines the mode in which the pin will act. The possible modes are:

  • INPUT: The pin will be configured as a digital input
  • OUTPUT: The pin will be configured as digital output
  • INPUT_PULLUP: The pin will be configured as a digital input with a pull-up Here I leave a study recommendation for pull-up and pull-down circuits but simply put. It forces a value when nothing is connected to the pin. If it's a pull-up, it's HIGH, and if it's pull-down, it's LOW.

As an example, if we want to use gpio4 as an output, we will have:

pinMode(4, OUTPUT)

digitalWrite(pin, value)

The digitalWrite() function changes the value of the informed pin. Possible values are: HIGH or LOW.

As an example, if we want to change the value of gpio4 to HIGH, we will have:

digitalWrite(4, HIGH);

One point we need to note is that there is an expected logical sequence to control the pin. First, we define it as OUTPUT and only then send a command to change the state. But what happens if we forget to use pinMode or set it to INPUT?

For these cases, the digitalWrite() command automatically enables the INPUT_PULLUP mode. This procedure protects the microcontroller from short circuits.

digitalRead(pin)

The function reads the digital value of the selected pin, returning the HIGH or LOW value. As an example, to read the status of gpio4, we will have:

value = digitalRead(4)

Of course, the value variable needs to be declared before it can be used. And if the pin is not connected to anything, the value will vary randomly (unless pullup is enabled).

analogRead(pin)

This function reads the analog pin. Or almost. The function returns a value between 0 and 1023, with 0 being the equivalent of the GND voltage and 1023 being the value referring to the VCC.

As an example, to read the status of adc0, we will have:

value = digitalRead(A0)

Constants

There are some predefined constants to refer to the pins more practically. When using either function, you can use either the gpio number or the related constant.

Differences in other modules

Here we look at the pin arrangement of the nodeMCU Lolin V3 board. There are slight differences on other cards. In Lolin itself there are versions with the ESP-12E module and others with ESP-12F. In this case of Lolin, the most significant difference is a change of position between GPIOs 4 and 5.

How to Avoid WordPress Security Issues

If you own a WordPress website, you probably understand the importance of WordPress security. Keeping your website secure is necessary as it helps keep attackers and hackers away. Just like you would not leave your valuable assets exposed to thieves, you should safeguard your WordPress with the same security level.

Essentially, WordPress developers are constantly working towards preventing any potential hacking. But that's not enough to keep your website secure. You need to apply other measures to safeguard your site.

In this article, we will discuss ways of improving your WordPress website security;

Add WordPress security plugins 

Security is key in running a website. There are various plugins to enhance your site security. These include Wordfence, Shield Security, iThemes, and Sucuri. WordPress security plugins have a lot of features to meet your security needs. These are features such as WordPress firewall, File changelogs, strong password generator, IP and User blacklisting, Force password to expire, and more.

Scan your site for malware 

If you've started experiencing low traffic in your website or you are dealing with weird performance issues, or you can detect suspicious behavior, you should check your website for malware.  It is recommended that you do a malware scan regularly, even if everything seems fine.

Keep in mind that some hacks breach your data anonymously. So, you may not even know that malicious activity is happening until extreme damage is done. It may reach the extent of Google pulling down your site from the search results due to security issues. You might even get blacklisted and suffer a huge loss. This explains why it's crucial to scan the website for malware often.

Pick a reliable hosting provider 

Server security is crucial as it helps protect your website from malware and hackers. So, it's essential that you pick a reliable hosting provider who understands website security's importance. The best company understands many things concerning WordPress security. They also have safety systems and offer prompt and dependable support in case anything unexpected happens. A good hosting provider offers the following;

  • Server-level firewalls
  • DDoS protection
  • Malware scanning
  • Backups
  • Latest OS (Operating System), hardware and software, and more.

Secure your website with superb credentials 

Hackers apply hacking techniques such as Brute force attacks because they are easy to implement. Anyone with little tech knowledge can execute a brute force attack with basic hacking tools. Other than that, executing a Brute force attack is effortless since most website owners use extremely weak admin passwords. For instance, most people love to use passwords such as '12345….' Among others that are easy to guess. This makes your website prone to attack. So, having a strong credential is a plus as it will secure your WordPress site from brute force attacks. A good password has characters such as &%$" £ and more.

Update your Themes, Plugins, and WP

WordPress websites release frequent updates with new features, enhancements, bug fixes, and security patches. The updates also enhance the feel and look of your website, not to mention that they improve functionality and stability. The updates also help seal website vulnerability.

Use 2-factor authentication 

2-factor authentication is a prominent security technique that helps safeguard online accounts. It's a protection process involving two steps. The first step entails entering your username and password, while the second requires you to provide a verification code sent to your email or phone.

Surprising Technology In Top Mattresses

When you think of the technology that's changed a lot over the past few years, your phone may be the first thing that comes to mind. After that, you might consider your vehicle, laptop, tablet or television. Your mattress is unlikely to be in your list of the top five or even 10 things that use a lot of innovation. However, it's true that new mattresses incorporate a great deal of research and technology. Today's mattresses are entirely different from those made just a decade ago. Here are a few of the types of technology that top mattresses use.

Sleep Research

When mattress manufacturers develop new products, they turn to sleep medicine physicians and sleep science to drive their decisions. New technology for performing sleep studies, tracking movement and monitoring the quantity and quality of sleep is helping mattress companies update their products. New information about sleep habits, cycles and quality ensures that the mattress you get will help you fall asleep and stay asleep. The right mattress also helps ensure that you wake up feeling well-rested.

Coils

Coils in mattresses aren't a new thing. They became common in the early 1900s. Over the past 100 years, the coils have changed. They're separated and enclosed. Some mattress manufacturers are even using nanotechnology. Today's coil mattresses are more complicated than those that were produced 10 years ago. When you choose a coil mattress today, you can expect motion isolation, more support and less noise when you move. The coil, like the rest of the mattress, really comes into its own when it's paired with other components.

Copper Infusion

Why would you want a copper-infused mattress, and what could possibly be the advantage? Well, copper has several sleeping advantages, such as breathability. It's no secret that many individuals (especially those who reside in hot climates) have difficulty sleeping because their mattresses can't keep up with the amount of air required to remove heat from the body. A layer consisting of a copper infusion will make heat transfer easier and manage your body temperature while you sleep, allowing you to rest like a baby all night long. Ideal for battling sleep sweats.

Organic Materials

A growing proportion of people are concerned about the chemicals to which they are exposed. Customers want mattresses that don't have as many chemicals. When an item releases chemicals, it's called off-gassing. Organic mattresses don't off-gas. Some mattresses are certified by independent organizations. The certifications include free of volatile organic compounds and 100% organic.

For example, the OEKO TEX Standard 100 Certification is for mattresses that contain no harmful chemicals. Mattresses with this certification don't off-gas. Some mattresses are made of soybeans, and others use recycled wool and cotton. Choosing an environmentally friendly mattress will help you feel confident that you're doing your part to protect the environment and conserve natural resources.

Sleep Sensor Technology

Have you ever questioned how good of a night's sleep you were getting? Many people ask for sleep studies to assess their average nightly sleep quality and quantity, but some mattresses now come with sleep sensor technology that can provide the same data without requiring you to depart from home. The breathing, heart rate, and the number of times you get out of bed are all tracked by these mattresses. Advanced beds with this technology can accurately tell you how many hours of excellent sleep you received on any particular night.

Mattress Covers

While a mattress cover is technically separate from a mattress, it is an important part of your bedding. The mattress covers protect the mattress. They keep shed skin cells, sweat and oils out of the mattress's fabric. Mattress covers prevent dust mites from infesting your bed. If you're allergic to dust or dust mites, a mattress protector is essential. Mattress covers also reduce stains caused by sweating. Your mattress will last longer and smell better if you get a cover for it.

Bamboo is one of the softest fabrics that exist. It's also a good insulator and highly breathable. A bamboo mattress cover will keep your bed clean and comfortable. The fibers in a bamboo mattress are woven to prevent tearing, even with repeated washing or use of an iron on it.

Foam Materials

Foam is a relative newcomer to mattresses. However, memory foam mattresses have become increasingly popular in the last two decades, accounting for around 20% of all beds sold.

There are different types of foams used in today's mattresses. You may prefer a plant-based foam for environmental and health reasons. There are also synthetic foams, which may be a good option if you have certain allergies. Keep in mind that foam traps heat. If you get hot while you sleep, be sure to pick a mattress that has a gel layer on top of the foam layer. The gel moves heat away from your body. The result is a more even temperature across your skin and the surface of your bed.

Ikea recently introduced a new memory foam mattress to the market that includes cooling gels and graphite. It has been met with both overwhelmingly positive reviews as well as concerns from consumers who have experienced issues with it.

Air/Number

Air/number technology is also a newer innovation. This technology allows you to control how firm your mattress is. With a remote or an app, you adjust how much air fills the spaces of the foam. More air results in a firmer bed. Large air/number mattresses allow each side of the bed to be set to a different firmness level. Choose this option if you have a sleep partner whose mattress firmness preferences are different from yours. An air/number mattress is also an excellent choice if you have a chronic pain condition that periodically flares, such as arthritis.

New technology will continue to advance mattresses. Each mattress manufacturer is incorporating this information and changing its materials, construction and techniques in order to improve upon its products. You benefit from this technology-driven innovation. The use of technology in mattress development will continue, and consumer demand for more features will hasten the pace of these beneficial changes. Choosing one of these new mattresses may help you sleep better and feel relaxed, rested and energetic when you wake up in the morning.

ESP8266 Operational WiFi Modes

In previous articles, we connected the ESP8266 to a pre-existing WIFI network. It is the commonly used method in projects, especially when there is interest in internet access.

For these cases, the ESP8266 operates as a “station” on the network. But we can find scenarios where there is no WIFI network to connect. Can we still use the ESP8266 in these cases? Yes, we can!

Where To Buy?
No.ComponentsDistributorLink To Buy
1ESP8266AmazonBuy Now

ESP8266 Operational Modes

The ESP8266 WiFi module can operate in 2 different modes:

  • STA (the module operates as a station and is available to connect to an Access Point).
  • AP (the module creates a network with customizable SSID and Password. We will discuss how each mode works, its limitations, and how to use

STA Mode

We use the STA mode to connect the ESP8266 to a pre-existing Wi-Fi network. This connection is made from an Access Point, which will be responsible for managing information traffic.

For configuration and use on the Arduino platform, we use the ESP8266WiFi.h library. Simple to use and extremely powerful, this library offers us all the tools to configure the WiFi module, without overloading us with flags and registers.

For our configuration, there are two more relevant functions, begin() and config().

begin() function

The begin() function needs some parameters necessarily and others optionally. This is because this function is of type overload, which provides more flexibility when calling the function. For a better example, let's look at the begin() function in its full form and its minimal form:

  • Complete form: begin(ssid, password, channel, bssid, connect)
  • Minimum Form: begin(ssid, password)

Same function, two ways to call it. And both works. This is because it was built with more than one declaration format in the library.

Let's take a look at the parameters it accepts:

  • SSID: The name of the network we want to connect to. Required field, and can contain up to 32
  • password: password for the chosen Required field, must be between 8 and 64 characters.
  • channel: Defines the bandwidth to be This parameter is optional and can be useful in areas with many different networks. Choosing a good channel can minimize interference and increase network range. If omitted, it will be selected automatically.
  • bssid: One more optional parameter. If set to true, the function will return the MAC of the AP it was connected
  • Connect: A Boolean parameter which, if set to false, will save the parameters defined in the function, but will not connect to the

This information will be saved in a reserved area of FLASH and in case of loss of connection, the attempt to reconnect will occur automatically.

Another important point is that, by default, the station is configured as a DHCP (Dynamic Host Configuration Protocol) client. This means that when connecting, the ESP8266 will ask the Access Point for an IP address. If the AP has DHCP enabled, we will receive a random IP within the network range configured there.

Config() function

The config() function is not mandatory for a connection such as a station. But you will need it if you want to connect to the network with a fixed IP address. The function has the following format:

  • config(local_ip, gateway, subnet, dns1, dns2) Where the parameters represent:
  • local_ip: IP address we want to assign to the
  • gateway: Access Point IP address.
  • Subnet: IP mask of the network where we will
  • dns1 and dn2: optional fields for IP address of DNS servers (Domain Name Server).

When we call the config() function, the DHCP mode is automatically disabled. Then the station will force the use of the address we choose. This method is useful when connecting over a network that does not have a DHCP server, or when having a fixed address is an essential project requirement.

You need to be careful when choosing the IP address and the subnet, as if it's incompatible with the network configuration, we will connect, but we won't be able to interact with anything.

In the image, we have a code for configuration and connection as a station.

Access Point Mode (AP)

In AP mode, the ESP8266 creates its WiFi network, allowing stations to connect to it. The figure below should help you better understand how it works. The ESP8266 configured as AP, replaces the role of the router in the network (with some limitations, but the principle is the same).

Strictly speaking, the name of this mode is Soft Access Point, because the functionality as an AP does not use any hardware resources equivalent to that of a common AP. It's like a Virtual AP. This does not impact health, but it does severely impact performance.

The main limitation is the number of connections it can manage. Although the manufacturer suggests up to 8 stations connected, you will have serious problems if you go beyond 5. If your application has a heavy data flow, I recommend that you limit it to 4 connections.

Another limitation is that the created network is not connected to the internet. So keep in mind that this is a model for applications that work well on local networks and for a few devices.

An example application for this format is an access control system. Approach with your cell phone, connect to the ESP8266 network, and be authorized to open a door.

Setting up this mode is very similar to that of a station. We have an overload function for begin and another one for configuration.

softAP() function

It would be the equivalent of our station mode begin() function.

  • softAP(ssid): to create an open network, without a password.
  • softAP(ssid, password, channel, hidden, max_connection): to create a protected network.

Let's take one for each parameter:

  • SSID: The name of our network, can contain a maximum of 63 This is the only mandatory field in the role and cannot be empty.
  • password: This field contains the password that the station needs to enter to connect. If not informed, the network will be open and can be accessed without any security. If you include one, it must contain a minimum of 8 characters, following the WPA2-PSK network security standard.
  • Channel: As we discussed for the station, this field defines the wifi operation It must receive a numeric value from 1 to 13. If not informed, it will receive 1 as the default value.
  • Hidden: If set to true, the SSID will be invisible and cannot be detected by identifiers (in your mobile's WiFi network list, for example. The network can still be connected if the station writes
  • Max_connection: Defines the maximum number of stations allowed. Receives values from 0 to 8, with 4 as the default.

softAPConfig() Function

This function sets some parameters referring to IP addresses. It has the format: WiFi.softAPConfig(local_ip, gateway, subnet)

Where the parameters represent:

  • Local_ip: IP address of the access point
  • Gateway: IP address of the gateway (this is what stations will use as a switch)
  • Subnet: Defines the IP range to be

With the code, you will configure a simple access point visible to your cell phone or computer.

STA + AP Mode

As the name suggests, the esp8266 will operate both as a station (being able to connect to a network) and as an Access Point (allowing stations to connect to it) at the same time.

The purpose behind this method is to use esp8266 in mesh network configurations. The idea is interesting, but if the performance is not already excellent operating as AP, imagine as AP and STA.

The documentation for this format is very scarce and, in a way, abandoned by the manufacturer itself. Espressif, when launching the successor of ESP8266, ESP32, included a specific library for MESH.

Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir