Tag: Javascript

Slack as a teamwork tool

Hello People. This article is about how to use Slack as a teamwork tool. As you know, Slack contains channels. You can create a different channel for each of your purpose. Channel contains all the people, messages and files related to a topic in one place.

In short, Slack is basically a messaging app. Teams and workplaces can be use Slack across multiple devices and platforms. You’re able to upload and share files with your groups too. You can also integrate with other apps and services and you can control almost every setting.

Slack Pricing

Slack is mostly free of cost to use. However you’ll only be able to browse and search your team’s 10,000 most recent messages, and you’ll be limited to 5GB of file storage and 10 apps or custom integrations. As of now, there are three pricing tiers available: Free, Standard ($8 or £5.25 a month billed monthly), and Plus ($15 or £9.75 a month billed monthly). A fourth tier, called Enterprise Grid, has special pricing for corporates.

Slack as a teamwork tool

How to start using Slack?

If you are an administrator of a team, please follow these steps:

  1. Go to Slack’s website and enter your email address to sign up 
  2. Choose a name for your Slack team
  3. Edit the URL to your Slack team
  4. Choose a username for yourself
  5. Enter emails of associates you’d like to invite to join your Slack team
  6. Your Slack team chat will then load in a browser window

Slack Settings

Click on your username or the drop-down arrow next to the Slack team name to access a settings menu. From here you can adjust your preferences (themes for the sidebar, messages, emoji style, and more), view your profile and account, access a Help/Feedback page, get Slack apps (more on that later), and set yourself to away.

If you’re an administrator, you can also access team settings, billing, etc. Team members will only see options to access app integrations, customise slack, and jump to team directory.

Hope this article on Slack as a teamwork tool is useful to you. Please read about Blockchain technology using Javascript

Blockchain technology using Javascript

Hello People. This article is about Blockchain technology using Javascript. As you already know, a blockchain is an open, digital, and duplicated ledger of transactions. Every new transaction history is recorded and stored in an encrypted way that is very difficult to modify. A copy of this recorded information is sent a cross the blockchain network. This makes it highly secure.

Blockchains are blocks of transaction data growing increasingly to create a chain of transaction occurrences. Valid transaction data is logged into the blockchain network following the peer-to-peer rule laid down by participants. Normally, the data in the databases are centralized. This means we operate based on only one server. Chances of risk are high due to failures of the system. Alternatively, decentralization allows data to be stored everywhere, thus making it faster, more secure and a better way of storing data.

We need to first install the crypto library using the command:

npm install --save crypto-js

We’ll use this library to import modules in our project.

We can start by creating a class BlockCypto as shown below:

const SHA256 = require('crypto-js/sha256');
class BlockCypto{
    constructor(index, current_time, info, nextHash=" "){
    this.index = index;
    this.current_time = current_time;
    this.info = info;
    this.nextHash = nextHash;
    this.hash = this.computeHash();     
    }
    computeHash(){
        return SHA256(this.info + this.nextHash + this.current_time + JSON.stringify(this.info)).toString();
    }   
}

Let us see each part of the code here:

We have created the class BlockCrytpo for our block and added a constructor just like any other JavaScript class.

In the constructor, we initialize its properties and assign parameters to it, as follows:

  • crypto-js/sha256: This is the module we’ve imported to calculate the hash of each block. We converted it to string using toString() method as the module will return the object.
  • index: This is a distinctive number tracking the index of every block in the blockchain.
  • current_time: As the name states, it keeps a record of the time when each transaction is completed.
  • info: All completed transactions data are recorded and stored by this method.
  • nexthash: It is pointing to the hash_key of the next block in the network chain. It’s mainly used to keep and maintain the integrity of the blockchain.
  • computeHash: Based on properties passed to this method, it is used to calculate the hashkey of the next block in the chain.
Blockchain technology using Javascript

What is blockchain theorem?

It is a type of database that stores a collection of data together in groups, with certain capacity of storage. The blocks are connected to the already created blocks, this forms a chain of a data tree.

The chain is irreversible as the system is decentralized. Here, each block is assigned a timestamp when added to the chain.

Now, let’s create a class Blockchain that will maintain this operation:

class Blockchain{
    constructor(){
        this.block1chain = [this.startGenesisBlock()];     
    }
    initGenesisBlock(){
        return new BlockCrypto(0, "06/04/2021", "Initial Block in the Chain", "0");
    }
    latestBlock(){
        return this.block1chain[this.block1chain.length - 1];
    }
    addNewBlock(newBlock){
        newBlock.nextHash = this.latestBlock().hash;
        newBlock.hash = newBlock.computeHash();        
        this.block1chain.push(newBlock);
    }
}

Let’s understand the code snippet above.

As usual, we have our constructor which instantiates the blockchain.

But this time, we passed it to the initGenesisBlock() method, which initializes the block in the chain. This property refers to an array of blocks in our case.

  • initGenesisBlock(): This is the first block created in the peer-to-peer network and has not been linked to any other. To our knowledge of indexing it’s at index 0.
  • latestBlock: As named, we use it for finding the last block added in the chain. As explained earlier, it helps to ensure the hash of the current block and map it to the hash of the previous block to ensure the chain integrity.
  • addNewBlock: A new block is added to the chain using this method. The previous hash block is matched to the current hash block to ensure minimal or no tampering with the chain.

Now that our blockchain is ready to work. We are missing something that is a core blockchain principle, the blockchain integrity.

Let’s see how to verify it and test our app.

Verifying blockchain integrity

The main characteristic of a blockchain is that once a block has been added to the network, it can’t be changed without invalidating the entire blockchain integrity.

To perform this, we use digital security or cryptographic hash, which ensures the securing and validation of the blockchain by producing a new hash every time a change is made in the block.

We’ll loop over the entire blockchain to check whether any hash has been tampered with, taking into account the exception of the first block, which is hardcoded.

Besides, this method verifies if the cryptographic-key of each two blocks in series are pointing to one another. If the integrity of the blockchain has been compromised, it returns false; otherwise, in case no anomalies are encountered, it returns true.

We’ll create this method inside the Blockchain class:

checkValidity(){
    // Checking validity
    for(let i = 1; i < this.block1chain.length; i++) {
        const currentBlock = this.block1chain[i];
        const nextBlock= this.blockchain[i-1];
    // Checking current blcok hash
    
    if(currentBlock.hash !== currentBlock.computeHash()) {
        return false;
    }
    // Comparing current block hash with the next block

    if(currentBlock.nextHash !== nextBlock.hash) {
        return false;
    }
    return true;
}

Now, we can test our app and see the results:

But, before we dive into running the code, let’s create a new instance of the Blockchain class and name it thecoin, and add some blocks in the blockchain using random values.

let thecoin = new Blockchain();

thecoin.addNewBlock(new BlockCrypto(1, "06/04/2021", {sender: "Rabin Yitzack", recipient: "Loyd Eve", quantity: 20}));

thecoin.addNewBlock(new BlockCrypto(2, "07/04/2021", {sender: "Anita Vyona", recipient: "Felix Mush", quantity: 349}));

console.log(JSON.stringify(thecoin, null, 4));

Hope this article on Blockchain technology using Javascript is useful to you. Please read Child Tracker IOT project architecture

WordPress Site Health 

Hello People. This article discusses how to achieve 100% in wordpress site health. WordPress site health feature helps website owners to monitor performance and security issues. This feature looks for common performance and security issues and gives a health check score to the website based on various tests. For example a test that checks if your website is running the latest PHP version. Using older PHP versions can make your website slow and may not be compatible with popular WordPress plugins. To achieve 100% wordpress site health, focus on the following things.

WordPress Hosting

Chosing the right web hosting service is the most important decision you make for a website. Using an unreliable hosting provider can affect your WordPress site. They use older software and do not have all the PHP modules installed. It is recommended to use Bluehost, SiteGround, Dreamhost. These are officially recommended WordPress hosting providers.

Install SSL / HTTPS

SSL protects the website by encrypting data transfer from server to user’s browsers. SSL enabled websites use HTTPs in their URLs.

Update your wordpress

Always make sure that you are using the latest WordPress version.

Update WordPress Plugins and Theme

WordPress themes and plugins are regularly updated. So look for the available updates and install them to keep your site updated. Plugins and themes use updates to deliver new features, fix bugs, and close security issues. You need to install updates to make sure that your website is not vulnerable to any known security issue. Please go to Appearance » Themes page to install an update.

Use the Latest MySQL or MariaDB Version

Always make sure that your website is running the latest stable version of MySQL/Maria. You can check the information about your database software version by switching to the info tab in site health.

Use The Latest PHP Version

WordPress is written in the PHP programming language. It is a server-side language. It runs on your hosting server to dynamically generate WordPress pages. Using the latest PHP version gives your website a performance boost. It also ensures compatibility with new WordPress plugin features that may require the latest PHP version to work correctly.

WordPress Site Health 

Enable WordPress Automatic Updates

WordPress has built-in ability to update itself and install the latest security releases. These are minor releases. But they are crucial for the safety and security of your website. These security updates are automatically installed on websites. Always make sure that automatic updates are enabled on your WordPress site to keep your site secure.

Remove Unused WordPress Plugins & Themes

It is better that you delete any inactive plugins that are not required.

Enable Rest API

REST API in WordPress allows developers to securely use HTTP requests to perform actions on a WordPress site.

Make Sure Required PHP Modules are Installed

PHP Modules and extensions are additional libraries that extend the functionality of the PHP programming language. WordPress recommends several PHP modules to be installed for optimal performance.

Disable Debug Mode

WordPress comes with a built-in debug mode which allows you to see if a plugin, theme, or custom code is having some errors. This feature is intended to be used by developers or advanced users. It is not recommended to turn on the WordPress debug mode for a live website.

Hope this article on Achieve 100% in WordPress Site Health is useful to you. Please read What is WordPress Site Health

Took Too Long to Respond error

Hello People. This article discusses about the “took too long to respond error”. Sometimes you might encounter the ‘website took too long to respond’ error when you try to access a particular website. This error indicates that there is a communication problem between the target server and the client. In this case your web browser. It must be understood that the targeted server is taking a long time to send a response to the client. The error appears if the client cannot get a response within 30 seconds. The connection attempt is then terminated.

Reasons for the ‘took too long to respond’ error?

Here are the reasons.

Internet connection problem

If you do not have an internet connection, this error occurs. Check that your device is connected to internet via a LAN or Wi-Fi. If you use a LAN, you need to check your LAN settings. You also need to make sure that your TCP/ipv4 protocols are correctly configured.

Much load on the server

If you are using shared hosting, there is a possibility that there is not enough memory to allow for a connection between your client and server. When using shared hosting, memory allocation is not equally distributed. There might be sites that use a lot of memory, leaving others with little memory available. Contact your service provider about your memory limit. If you are using WordPress, you can check your memory limit in the ‘Site Health Tool’ on your dashboard.

You may also want to change your hosting plan to a VPS (Virtual Private Server) package, where memory is shared equally among users.

There are also other reasons that may cause your site to be overwhelmed. Increase in site traffic, or code and scripts that have not been deferred to load only after your site fully loads.


Took Too Long to Respond error

Antivirus is blocking site access

Sometimes Your antivirus might block access to some sites or even all of them. You may need to temporarily disable it and see whether the ‘taking too long’ error is resolved.

DNS cache

The DNS (Domain Name System) is what converts domain names to IP addresses. DNS results are usually cached in order to make sure that subsequent requests are handled faster. If there was a communication problem between client and server, it may be cached, resulting in the ‘website took too long to respond’ error. Clearing the DNS cache should solve the error.

Outdated extensions

Extensions may not be as frequently updated for compatibility with web browsers. On Chrome, virus scanning extensions, for example, Symantec, outdated or not, tend to be ‘heavy’, which slows down your browser.

Browsing history

Stored data from browsing sessions such as saved passwords, cookies, site names, and URLs, as well as cache can contribute to client-server communication problems.

Chrome’s default profile folder issues

There is always a folder named ‘Default’ on your local machine which store’s your ‘Chrome Profile’ (your bookmarks, saved passwords, apps, browser settings, and extensions). If there is corrupted content in the folder, it may affect communication between client and server. You may need to edit or rename this file in order to fix ‘taking too long’ issues.

Windows hosts file

The hosts file is what maps domains to IP addresses. If you want to see for example how your site would look if you hosted on a different server, you would need to edit the hosts file.  If you have blocked website URLs or IP addresses in your hosts file, they might cause other sites to be blocked too, resulting in the page taking too long to load error.

The network adapter is not installed or is out of date

Drivers are very important for seamless communication between software and hardware. If your network driver is not up to date it may result in broken client-server communication.

Your browser contains corrupted files

Your browser may contain corrupted files. By reinstalling the web browser might solve this problem.

Theme incompatibility

If you are using WordPress, your theme incompatibility issues could be the reason for the ‘took too long to respond’ error. The only way to know whether it is your theme that is causing the issues is to change it to a default theme. If the error gets fixed, then you need to reinstall your theme.

Too much data in your database

If your database contains a lot of data, your site may take too long to retrieve all that data from your site.

Hope this article on Took Too Long to Respond error is useful to you. Please read about Power supply to Arduino boards


Arduino boards power supply

Hello People. This article is about Arduino boards power supply. There are several power pins on an arduino board.

The different power pins are as follows:

  • VIN. This pin can take input voltage to the Arduino board when it’s using an external power source (as opposed to 5 volts from the USB connection or other regulated power source). You can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.
  • 5V. This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 – 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don’t advise it.
  • 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
  • GND. Ground pins.

The Arduino Uno can be powered via the USB connection or with an external power supply. The power source is selected automatically.

External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board’s power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector.

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.

Arduino boards power supply

Summary

There are mainly three methods of supplying power to arduino board. The Vin, 5V, 3.3V, and GND pins are Arduino power pins. You can use the Vin pin to Power your Arduino with an unregulated 7 to 12-volt power source. Like a 9V battery or a wall adapter that is in the range of 7 to 12 volts. Alternatively, you can power your Arduino through the 5V pin with an external regulated 5V power supply. It can be a wall adapter that gives out constant 5V or a DC-DC converter that is connected to a battery or a set of batteries. You can use both the 5V pin and the 3.3V pin to provide power to modules that are connected to the Arduino. But you can’t use the 3.3V pin to power your Arduino Uno/Nano.

Hope this article on Arduino boards power supply is useful to you. Please read Arduino UNO Pins explained

Arduino UNO Pins explained

Hello People. This article is titled Arduino UNO Pins explained. Arduino Uno is one of the most popular microcontroller. It has the development board based on 8-bit ATmega328P microcontroller. In addition to ATmega328P MCU IC, it consists other components such as crystal oscillator, serial communication, voltage regulator, etc. to support the microcontroller.

Arduino Uno has 14 digital input/output pins (6 of them can be used as PWM outputs), 6 analog input pins, a USB connection, A Power barrel jack, an ICSP header and a reset button.

How to use Arduino UNO Pins

As explained above, the 14 digital input/output pins can be used as input or output pins by using pinMode(), digitalRead() and digitalWrite() functions in arduino programming. Each pin operates at 5V and can provide or receive a maximum of 40mA current, and has an internal pull-up resistor of 20-50 KOhms which are disconnected by default.  Out of these 14 pins, some pins have specific functions as listed below:

  • Serial Pins 0 (Rx) and 1 (Tx): Rx and Tx pins are used to receive and transmit TTL serial data. They are connected with the corresponding ATmega328P USB to TTL serial chip.
  • External Interrupt Pins 2 and 3: These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value.
  • PWM Pins 3, 5, 6, 9 and 11: These pins provide an 8-bit PWM output by using analogWrite() function.
  • SPI Pins 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK): These pins are used for SPI communication.
  • In-built LED Pin 13: This pin is connected with an built-in LED, when pin 13 is HIGH – LED is on and when pin 13 is LOW, its off.
Arduino UNO Pins explained

Along with 14 Digital pins, there are 6 analog input pins. Each of them provide 10 bits of resolution, i.e. 1024 different values. They measure from 0 to 5 volts but this limit can be increased by using AREF pin with analog Reference() function.  

  • Analog pin 4 (SDA) and pin 5 (SCA) also used for TWI communication using Wire library.

Arduino Uno has two other pins as explained below:

  • AREF: Used to provide reference voltage for analog inputs with analogReference() function.
  • Reset Pin: Making this pin LOW, resets the microcontroller.

Hope this article titled Arduino UNO Pins explained is useful to you. Please read Install PIP for Python on Windows

Install PIP for Python on Windows

Hello People. This article discusses how to Install PIP for Python on Windows. PIP is a package management system to install and manage software packages written in Python. PIP stands for “preferred installer program” or “Pip Installs Packages.” It is a utility to manage PyPI package installations from the command line.

If you are using an older version of Python on Windows, you may need to install PIP. You can install PIP on Windows by downloading the installation package, opening the command line, and launching the installer.

Check if PIP is Already Installed in your PC

PIP is automatically installed with Python 2.7.9+ and Python 3.4+ and it comes with the virtualenv and pyvenv virtual environments. So check if PIP is already installed.

1. Launch the command prompt window:

  • Press Windows Key + X.
  • Click Run.
  • Type in cmd.exe and hit enter.

Alternatively, type cmd in the Windows search bar and click the “Command Prompt” icon.

2. Type in the following command at the command prompt:

pip help

If PIP responds, then PIP is installed. Otherwise, you will see an error saying the program could not be found.

Install PIP for Python on Windows

Installing PIP

Follow the steps below to install PIP on Windows.

Download PIP get-pip.py

Before installing PIP, download the get-pip.py file.

1. Launch a command prompt if it isn’t already open. To do so, open the Windows search bar, type cmd and click on the icon.

2. Then, run the following command to download the get-pip.py file:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

Installing PIP on Windows

To install PIP type in the following:

python get-pip.py

If the file isn’t found, double-check the path to the folder where you saved the file. You can view the contents of your current directory using the following command:

dir

The dir command returns a full listing of the contents of a directory.

Verify Installation

Once you’ve installed PIP, you can test whether the installation has been successful by typing the following:

pip help

If PIP has been installed, the program runs, and you should see the location of the software package and a list of commands you can use with pip.

If you receive an error, repeat the installation process.

Add Pip to Windows Environment Variables

To run PIP from any location, you need to add it to Windows environment variables to avoid getting the “not on PATH” error. To do so, follow the steps outlined below:

  1. Open the System and Security window by searching for it in the Control Plane.
  2. Navigate to System settings.
  3. Then, select Advanced system settings.
  4. Open the Environment Variables and double-click on the Path variable in the System Variables.
  1. Next, select New and add the directory where you installed PIP.
  2. Click OK to save the changes.

Step 5: Configuration

In Windows, the PIP configuration file is %HOME%\pip\pip.ini.

There is also a legacy per-user configuration file. The file is located at %APPDATA%\pip\pip.ini.

You can set a custom path location for this config file using the environment variable PIP_CONFIG_FILE.

Upgrading PIP for Python on Windows

New versions of PIP are released occasionally. These versions may improve the functionality or be obligatory for security purposes.

To check the current version of PIP, run:

pip --version

To upgrade PIP on Windows, enter the following in the command prompt:

python -m pip install --upgrade pip

This command uninstalls the old version of PIP and then installs the most current version of PIP.

Downgrade PIP Version

Downgrading may be necessary if a new version of PIP starts performing undesirably. To downgrade PIP to a prior version, specifying the version you want.

To downgrade PIP, use the syntax:

python -m pip install pip==version_number

For example, to downgrade to version 18.1, you should run:

python -m pip install pip==18.1

Hope this article on how to Install PIP for Python on Windows is useful to you. Please read What is Blockchain Technology

Blockchain Technology explained

Hello People. This article makes you Blockchain Technology explained. A blockchain is a distributed database that is shared among the nodes of a computer network. It stores information electronically in digital format.

Blockchains are used in cryptocurrency systems, such as Bitcoin, for maintaining a secure and decentralized record of transactions. It guarantees the fidelity and security of a record of data and generates trust without the need for a trusted third party.

Main Features

  • Blockchain is a shared database. It differs from a typical database in the way that it stores information.
  • Blockchains store data in blocks that are then linked together via cryptography.
  • When data comes in, it is entered into a fresh block. Once the block is filled with data, it is chained onto the previous block, which makes the data chained together in chronological order.
  • Most common use of blockchain so far has been as a ledger for transactions. 
  • In Bitcoin, blockchain is used in a decentralized way so that no single person or group has control. All users collectively retain control.
  • Data entered is irreversible. Transactions are permanently recorded and viewable to anyone.
Blockchain Technology explained

Blockchain working process

The purpose of blockchain is to allow digital information to be recorded and distributed, but not edited. In this way, a blockchain is the foundation for immutable ledgers, or records of transactions that cannot be altered, deleted, or destroyed. This is why blockchains are also known as a distributed ledger technology (DLT).

Blockchain’s first widespread application in use was Bitcoin in 2009. In the years since, the use of blockchains has exploded via the creation of various cryptocurrencies, decentralized finance (DeFi) applications, non-fungible tokens (NFTs), and smart contracts.

Blockchain has three important concepts: blocks, nodes and miners.

Blocks

Every chain consists of multiple blocks and each block has three basic elements:

  • The data in the block.
  • A 32-bit whole number called a nonce. The nonce is randomly generated when a block is created, which then generates a block header hash. 
  • The hash is a 256-bit number wedded to the nonce. It must start with a huge number of zeroes (i.e., be extremely small).

When the first block of a chain is created, a nonce generates the cryptographic hash. The data in the block is considered signed and forever tied to the nonce and hash unless it is mined.  

Miners

Miners create new blocks on the chain through a process called mining.

In a blockchain every block has its own unique nonce and hash, but also references the hash of the previous block in the chain, so mining a block isn’t easy, especially on large chains.

Miners use special software to solve the incredibly complex math problem of finding a nonce that generates an accepted hash. Because the nonce is only 32 bits and the hash is 256, there are roughly four billion possible nonce-hash combinations that must be mined before the right one is found. When that happens miners are said to have found the “golden nonce” and their block is added to the chain. 

Making a change to any block earlier in the chain requires re-mining not just the block with the change, but all of the blocks that come after. This is why it’s extremely difficult to manipulate blockchain technology. Think of it as “safety in math” since finding golden nonces requires an enormous amount of time and computing power.

When a block is successfully mined, the change is accepted by all of the nodes on the network and the miner is rewarded financially.

Nodes

One of the most important concepts in blockchain technology is decentralization. No one computer or organization can own the chain. Instead, it is a distributed ledger via the nodes connected to the chain. Nodes can be any kind of electronic device that maintains copies of the blockchain and keeps the network functioning. 

Every node has its own copy of the blockchain and the network must algorithmically approve any newly mined block for the chain to be updated, trusted and verified. Since blockchains are transparent, every action in the ledger can be easily checked and viewed. Each participant is given a unique alphanumeric identification number that shows their transactions.

Combining public information with a system of checks-and-balances helps the blockchain maintain integrity and creates trust among users. Essentially, blockchains can be thought of as the scalability of trust via technology. 

Hope this article on Blockchain Technology explained is useful to you. Please read about Printed Circuit Board designing business

Clients for Mobile app development

Hello People. This article discusses how to get clients for Mobile app development. Finding clients is a major problem for IT startups and entrepreneurs. Here are few useful tips to get clients for app development companies.

Firstly highlight the skill you are expert in. For example we have good command over android development so what we would do is that we find websites which have no apps yet in the playstore. We will drop a mail to owner on that website that you are lacking much audience because this era is of app users and there are trillions of folks using smart phone. We can build your app at a very reasonable price. In this scenario if client gets ready you could be able to build up portfolio.

You can also try getting business through LinkedIN. Visit your profile page on LinkedIN from your mobile app or desktop, and if business feature is turned on for you, you’ll see a box under your profile photo/headline that talks about how to showcase the services you provide. Click “Add Services,” and then fill out the form to provide details about the services you provide. Be as detailed as possible so members who view this section have a good sense for what you provide. Click “continue” and this will automatically be added to your profile.

Clients for Mobile app development

For finding clients on linkedIn, you must have a good connection with your targeted audience. You can search clients by their posted requirement like: “Looking for the freelancer designer or developer”. Once you type a statement like this one in the search box you will get the list of a result as you have to sort the list by “Content”. Then you can able to view all the posts related to that “keyword/requirement”. You have to pitch to that Author who has posted the requirement. You can simply comment or you can connect with him for further discussion.

Hope this article on how to get clients for Mobile app development is useful to you. Please read about Optical Character Recognition in React

Optical Character Recognition in React

Hello People. This article discusses about Optical Character Recognition in React. OCR is very useful when you want to extract text from a scanned document on a browser. Applying OCR technology through a React application, you can upload your images in various formats and can apply OCR to extract text content so easily. 

How to achieve Optical Character Recognition in React?

We’ll use two third party libraries for different purposes. The first one is “tesseract.js”. It’ll allow us to run OCR easily with just a couple of lines of code. The second one is “react-images-upload”, it’ll allow us to upload images to the browser and access their locations easily.

Here we do a couple of new things and you may want to follow them carefully. We should put the code snippet above the return we need to create 3 states here to achieve different goals. The first state we have here is to take the image URLs from our ImageUploader component and save it for further processing, the second state is the one that we keep our OCR applied texts, and the third one is the one for loading logic.

Optical Character Recognition in React

onDrop function is called whenever a change happened in our ImageUploader component . So whenever a change happens like adding or removing the photos in our component this function will be fired up. It’ll take the argument we need in the second position after the onChange event is fired so we can simply bypass the first argument by putting “_” and take the second one. It has link/links for our images in it and it’ll bring the full latest list of links so whenever we get a list from our function we can safely put that in our array.

runOcr function seems tricky but in fact, it’s quite simple, we take our URLs state and run the following recognition script for each element. Tesseract recognize function takes at least 2 arguments, first is the URL and the second one is the target language, tesseract.js supports over 100 languages. After the requests resolve we take output text and add it to our current array. After we fire runOcr command we can setIsLoading to true so we can display our spinner.

Hope this article on Optical Character Recognition in React is useful to you. Please read What is Node Red and its application

Navigation

× Contact Us