teleren/devto huggingface dataset:
Best Software Development Company In India
Published: 2022-07-29 15:29:55


India is a sanctuary for remote software development. The nation is home to some of the largest offshore custom software development companies because to a wide skill pool and ambitious digital entrepreneurs who collaborate. For your small to large, difficult to simple software projects, you can solely engage dedicated developers.

There are many things to check when there are so many possibilities to select from. But making a choice might be simple if you are aware of a reputable bespoke software development business and their capabilities. This blog aims to introduce you to the leading software companies in the area that have a range of specialties. So let's get going right away.

## eSparkBiz Technologies Is Of The Best Custom Software Development Companies in India



One of the most dependable software firms in the market is eSparkBiz, a CMMI level 3 certified organisation. They are based in India and have offices in strategic locations across the world to provide you with the ideal fusion of regional talents and financial advantages. Harikrishna Kundariya, a marketer, developer, and expert in IoT, chatbots, and blockchain, co-founded eSparkBiz.


They are an expert custom software development firm with offices in India and the US. They have 12+ years of IT expertise and have successfully finished more than 1000 customer projects. Additionally, Clutch, the top rating and review site, has received positive feedback about their working style and services from customers. It is continuously rated as one of the best software development firms in India on their annual list.


You can customize all of your software development projects at this location. They house expert developers that can help you in creating bespoke front-end, back-end, UI/UX designs, user-friendly applications & portals with modern techs like Data Science, AI, AR/VR, DevOps, and ML with ease.



Their client-centric approach weaved with the business logic leads to innovative products that guarantee business growth


To Read More Please Click On The Following Link
_https://www.hindustantimes.com/brand-stories/top-10-custom-software-development-companies-in-india-101658322751059.html_
Simple Swift Challenges (2)
Tags: beginners, swift, mobile, programming
Published: 2022-07-29 15:23:00

Greetings 👋,

I've constructed 3 Swift challenges and listed them below. First, you'll find the challenges and further down the page you'll find the solutions. If you aren't able to solve them, before looking at the solutions, try to find some help through a Google search or at https://developer.apple.com/documentation/swift

* I struggled a bit coming up with creative ways to write the challenges 😅. Please bear with me :) 

Have fun :)

 1. Help! I have a list of people and I need to quickly find a certain person. This person's name starts with "Is" and ends with "h". What two methods can you use check a string for these values?
    
    let personOne = "Isaac"
    let personTwo = "Isiah"


 2. Create a variable for an integer with the value of one million and make it reader friendly.


 
 3. I have 12 pieces of candy and I have 3 students. Will I be able to split the candy evenly? (Hint: Use a method to see if the 12 is a mulitiple of 3)
    
    let candy = 12;
    

*
*
*
*
*
*
*
*
*
*
*
*

 1. Help! I have a list of people and I need to quickly find a certain person. This person's name starts with "Is" and ends with "h". What two methods can you use check a string for these values?
    
    **.hasPrefix("Is")**
    **.hasSuffix("h")**
 
    **for instance:**
       let personOne = "Isaac"
        let personTwo = "Isiah"
        
        personOne.hasPrefix("Is")
        personOne.hasSuffix("h")
        personTwo.hasPrefix("Is")
        personTwo.hasSuffix("h")
 

    _these methods will return a Boolean, either true or false, based on whether the string starts/ends with the specified string or not._ 

 
2. Create a variable for an integer with the value of one million and make it reader friendly.
 
    **var million = 1_000_000**
 
    _In Swift, you can insert an underscore in the place of a comma to help with readability_

 
 3. I have 12 pieces of candy and I have 3 students. Will I be able to split the candy evenly? (Hint: Use a method to see if the 12 is a mulitiple of 3)
    
    **let candy = 12;**
    
    **candy.isMultiple(of: 3)**
 
    **can also be written as: 12.isMultiple(of:3)**
 
    _This method returns a Boolean value-true if it is a multiple,false if it is not a multiple_
Hash routing in Remix!
Tags: javascript, webdev, react, tutorial
Published: 2022-07-29 15:09:58

[Remix](https://remix.run/) is the newest hottest full-stack React framework. Remix supports file-based routing which uses `react-router-dom` under the hood which is a popular react routing library.

Because Remix users react-router's _BrowserRouter_ internally, you can't actually do **Hash Routing** (id based routing that triggers scrolling) with it. 

For example, if you create a link like this,
```jsx
<Link to="#footer">
    Go to bottom
</Link>
```
it will surely change the browser URL, but won't scroll down to the element with an id of footer.

Of course, there's an easier way to achieve this behavior.

## Turning off Client-Side Routing
We can add a `reloadDocument` prop to the specialized **Link** component and it will start acting like a normal anchor tag.

```jsx
<Link to="#footer" reloadDocument>
    Go to bottom
</Link>
```

This in turns, turns off client-side routing and lets the browser handle the transition, as [mentioned here](https://reactrouter.com/docs/en/v6/components/link)

This is fine until you want both client-side routing and scroll behavior on hash routing.

## Manual Scrolling via Side-Effect
The workaround this is to catch the side-effect created by the route change inside a `useEffect` and handle the scrolling manually.

In the root (_root.jsx_ file) of our projects, we have to get the _location_ object from the `useLocation` hook provided by remix. Then, we have to create a _useEffect_ which depends on that location object. The _location_ object has a property called _hash_ which provides us with the hash portion of the URL e.g. **#footer** if the URL is **www.example.com/#footer**. Then we can look up the element containing that id and manually scroll down to it using the `scrollIntoView` method.

```jsx
const location = useLocation();

useEffect(() => {
  if (location.hash) {
    const el = document.querySelector(location.hash);
    if (el) {
      el.scrollIntoView();
    }
  }
}, [location]);
```
VSCode Status bar not showing PHP version
Tags: php, vscode
Published: 2022-07-29 15:02:22

Hello!

I have a problem with VSCode and I have no idea how to solve. The status bar should show my PHP version like when I use Python, but it doesn't.

What I expect to see:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0cfv5zggx3wn871kv1xq.png)


What I see (in my VSCode):


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hdhijtm3m0s4ltydblyp.png)

Does anybody know why this is happening, and how I could fix it?

Thank you very much!

Renato
Visual Paradigm - enable/disable blocks in templates
Tags: visualparadigm
Published: 2022-07-29 14:48:00

Visual Paradigm provides XML-based template language (DCTL - document template language), which is support many options to filter elements. You can introduce variables into templates and get flexible filter of models in different document using the same template. 

But DCTL doesn't support enabling or disabling part of document. For example, there is not a direct way to enable output of the table with component's tagged values in one document, and disable this table in another documents using the same template.

I developed a simple "hack", which allows to enable/disable block via variable. It's based on that filtering by `modelTypes` or `stereotypes` attributes of Conditional Checkers. If you doesn't write attribute or set empty to filtering, this rule always return true. Next snippets accept any stereotypes valuee:

```xml
<HasValueChecker property="taggedValues">
<HasValueChecker stereotypes="" property="taggedValues">
```

Due to this behavior we can implement enable/disable blocks. For example, create a simple template as below.  Take an attention on `stereotypes="${disable_tagged_values}"`
```xml
<ElementBaseInitiationBlock
        xmlns="http://www.visual-paradigm.com/2015/DocComposer">
    <Property property="name" style="@heading+"/>
    <ParagraphBreak/>
    <HasValueChecker stereotypes="${disable_tagged_values}" property="taggedValues">
        <Text>Output of tagged values is enabled</Text>
    </HasValueChecker>
    <HasValueChecker stereotypes="${disable_tagged_values}" property="taggedValues" flag="false">
        <Text>Output of tagged values is disabled</Text>
    </HasValueChecker>
</ElementBaseInitiationBlock>
```

Create a simple component with tagged values:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/egvs2f7p8ahwvzboik11.png)
 
And apply the created template to a new document. You should see:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c58dwn4dnp6s6zhdk935.png)

Set a variable `disable_tagged_values` to any value (true,  ex.) and document is changed to _Output of tagged values is disabled_.  If you clear the value text will be _Output of tagged values is enabled_.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vvtxql77jcor7906xd76.gif)

## Links
https://www.visual-paradigm.com/support/documents/vpuserguide/304/1983/86365_usingvariabl.html - Using variables in Doc. Composer
Some important Linux Commands for Devops
Tags: beginners, devops, bash, linux
Published: 2022-07-29 14:40:56

Today I'm going to share some of the important linux commands that you will be using as a Devops Engineer

So, lets get started

1. `cat /etc/os-release` -> To get the OS details (eg. name,version etc)

2. `ps aux | grep "process_name" ` -> To get the process owner details ( eg. `ps aux | grep "jenkins" ` )

3. `cut -d: -f1 /etc/passwd ` -> To get the all the users list

4. `lsblk` -> To get all the list of block devices mapping

5. `df -h` -> To get the filesystem details

6. `uname -a`-> To get the OS name, machine name and kernal

7. `wget https://...` -> To download files from the web.

8. `ifconfig` -> To check the network interfaces

9. `netstat -a` -> To list all network ports, routing tables, sockets and connection details

10. `apt list --installed` -> To check the installed packages ( eg. `apt list apache2` -> To check apache2 related packages)
11. `apt list | grep nginx` -> To check if ngnix is installed
12. `dpkg --list | grep nginx` -> To check the installed packages
13. `cat /etc/services | less` -> To check the open ports
14. `netstat -atu` -> To check the open tcp ports
15. `netstat -lntup`  -> To check the open tcp as well as udp ports that are listening along with their process ids 
16. `lsof -i 4 -a -p <Process-Number>` -> for listing open files related to processes ( 4 implies ipv4, -a is used for Anding the output, -p is used to specify the process id we wish to check)
My struggles with TypeScript
Tags: typescript, javascript, job, search
Published: 2022-07-29 14:34:53

## Premise

**TypeScript** has changed the schemes, the first time I heard about it, I thought 🤔: 

"Simple, just declare the data type and that's it"! 

I soon realized it's not that simple! 😞

Things are not exactly like this and in any case, this logic applies to everything, variables, objects, functions, classes, etc., in short, it is another way of programming, it is another way of thinking, you have to completely change your approach!
 
## Realization

The best ones can do amazing things with TypeScript, I think _it has now become an essential tool_ for those who regularly use JavaScript! 

I have developed some little projects in React, some simple applications, a blog, and I must admit that the idea of redoing everything with TypeScript scares me deeply! 😱

The secret to learning is to practice constantly! So, since I am constantly looking for work, I made this little application using JavaScript and TypeScript to see the newest job offers on the market!

## Some examples.

For example, if you use _axios_ package, in normal project, you simple need to import the package, in TypeScript you need also to import _AxiosResponse_ to specify the type of the axios response, like this:

```
// Import axios
import axios, { AxiosResponse } from 'axios';

 ```
If you have an object, you need to describe the shape of it using ‘Interfaces’;

```
interface Job {
title: string;
description: string;
company: {
display_name: string;
};
location: {
display_name: string;
};
category: {
label: string;
};
contract_type: string;
created: string;
latitude: number;
longitude: number;
redirect_url: string;
salary_min: number;
salary_max: number;
}

```
Sure, the code becomes more robust, but it is easy to understand that in this way the code extends beyond measure, to be clear, it is not a criticism, but an simple observation!

## Conclusions.

Slowly using TypeScript I have to admit that I start to like it and as I said before, I think it has become an essential tool, in fact I see it in job requests, before employers only asked for JavaScript, now they also ask for TypeScript!

In this video you can see my struggles with TypeScript. 

{% embed https://youtu.be/DUM4iZKStA8 %}

Have a Good day! 👋
[7/40 things about data] When I try to understand data I always end up using a histogram
Tags: data, datavisualization
Published: 2022-07-29 14:33:00

When visualizing data you have to pick the right visualization type but before that, you need to understand the data.

I start using an avg, then avg plus stddev, then min-max and finally I go with a histogram.

It captures min, max, avg and most importantly, the data distribution.
Revived extension to autoformat with Rubocop in VSCode
Tags: ruby, vscode
Published: 2022-07-29 14:24:00

There is a nice VSCode extension called `vscode-ruby-rubocop` that you can use to automatically format a Ruby file using `Format document (Shift+Alt+F)`. Unfortunately, that extension seems to be unmaintained for over 6 months now... 😢

But there is some good news. 🎉🎉 I have forked the repository and fixed a few things:

- Changed the Rubocop argument `--auto-correct` to `--autocorrect` because `--auto-correct` is deprecated.
- Added configuration option `ruby.rubocop.useServer`. When you enable this option, Rubocop is started with `--server` which [dramatically increases](https://metaredux.com/posts/2022/07/26/rubocop-serves-much-faster.html) formatting speed. Keep in mind, this option only works with Rubocop >= 1.31.

You can find the revived extension at GitHub and in the VSCode marketplace. 

- Marketplace: https://marketplace.visualstudio.com/items?itemName=LoranKloeze.ruby-rubocop-revived
- GitHub: https://github.com/LoranKloeze/vscode-ruby-rubocop-revived
Leetcode - Binary Search ( Using Javascript )
Tags: javascript
Published: 2022-07-29 14:01:21

Below is problem statement

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7vuwkzodvqp32mj1ait1.png)

Binary search algorithm is one of the most famous searching algorithms. Even though it is not very difficult to understand, it is very important that we understand it thoroughly and know how to properly implement it.

Binary search algorithm helps us to find the position of a target value within a sorted array. It gives us O(log n) time complexity.

Binary search compares the target value to the middle element of the array. If they are not equal, based on that comparison either the first half or the second half of the array is selected while the other one is eliminated. The search then continues on the remaining half. The middle element is again compared to the target value. This process repeats itself until the target value is found.

First, I am going to declare two pointers to solve this problem:

Left pointer, which is going to point to the first number in the array and;
Right pointer, which is going to point to the last number in the array.
Then, I calculate the middle number by taking the sum of the left pointer and the right pointer and dividing that by two. Since we're dealing with indices and we know that an index cannot be a decimal number, we have to round this number down.

Now that we have the middle number, we are going to compare it to our target number.

- If they are equal, we will return the index of the middle number.

- If the middle number is less than the target number, we will eliminate the second half of the array on the right side of the middle number. We will then move our left pointer and repeat this until the target value is found.

- If the middle number is more than the target number, we will eliminate the first half of the array on the left side of the middle number. We will then move our right pointer and repeat this until the target value is found.

`var search = function(nums, target) {
    let left =0;
    let right = nums.length -1;
    while(left <= right){
        const middle = Math.floor((left + right) / 2);
        const potentialMatch = nums[middle];
        if(target == potentialMatch){
            return middle;
        }else if(target < potentialMatch){
                 right = middle -1;
                 }else{
                     left = middle + 1;
                 }
    }
    return -1;
};`
An Exercise with Debugging and Promises
Published: 2022-07-28 01:19:00

Debugging skills are one of the hardest to gain as someone new to development, so I thought I'd take the time to share some of the exercises that stumped me. Give this one a try!

You have two functions:

1. getResult returns a Promise with a 50% chance to succeed and a 50% chance to reject.

2. testGetResult calls getResult and logs the output once. 

Here is the implementation that was given to you:

### getResult
getResult is an async function that returns a Promise. The Promise will either reject or resolve in 1000 miliseconds, and whether it rejects or resolves depends on a variable generated. The variable will have a value between -0.5 to 0.5; in other words, there is a 50% chance of the variable being positive. If the variable is negative, it rejects. Simple, right?

```js
const getResult = async () => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      let number = Math.random() - 0.5
      if (number < 0) { reject("failure") }
      resolve("success")
    }, 1000)
  })
}
```

getTestResult is even more simple.
It initiates a variable called `result` and simply gets the Promise from `getResult()`. It will then log whether it succeeded or not.

### getTestResult
```js
async function testGetResult() {
  let result = await getResult()

  result.then((res) => console.log(res))
        .catch((err) => console.log(err))
}
```

### The Issue
When running this example, node throws an error:

```
node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "failure".] {
  code: 'ERR_UNHANDLED_REJECTION'
}
```

What went wrong?

I'll update the post with an answer in a few days :)

Update 08/01

Hint: what is the type being returned from `getResult()`?
How to set multiple headers on nodejs express server response
Tags: react, node, javascript, programming
Published: 2022-07-29 13:55:00

Let me start by saying, I respect Dave Gray a lot, he is the greatest Youtube tech creator out there. I really admire his method of project-based learning.


![BMC](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c6ak6cddjcldknl93eb0.gif)

This tutorial is in reference to his [nodejs_tutorial](https://www.youtube.com/watch?v=f2EqECiTBL8) where he creates a REST API.

One day, I was working on a MERN stack application, as part of a side-project, and I kept on getting this error.


![cors error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o6i41sr26tof8v5dt2jy.png)

After some [research](https://dev.to/masterifeanyi/cookies-in-javascript-18dj), I came up with a solution.

When working with Node.js, you need to set the headers on the servers response.

```javascript

// middleware/credentials.js


const allowedOrigins = require("../config/allowedOrigins");

const credentials = (req, res, next) => {
    const origin = req.headers.origin;
    if (allowedOrigins.includes(origin)) {
        res.set({
            "Access-Control-Allow-Origin": origin, // ==> new header
            "Access-Control-Allow-Credentials": true
        })
    }
    next();
}

module.exports = credentials

```

The error is caused because the header `Access-Control-Allow-Origin` was not present. This header allows the origin (host) that made the request to be able to access the servers' resources.

The second header `Access-Control-Allow-Credentials` is used whenever a request is made with cookies to the server.

I learnt how to set multiple headers from this [post](https://stackoverflow.com/a/54178274/17171424)

**Reference**

[difference between setHeader and header](https://stackoverflow.com/questions/40840852/difference-between-res-setheader-and-res-header-in-node-js)


**Summary**

I tried to show you how to set multiple headers on the server's response.

**Thank You**

Follow me on [twitter](https://twitter.com/ifeanyiTchima), [github](https://github.com/MasterIfeanyi) and [linkedin](https://www.linkedin.com/in/ifeanyi-thankgod-chima/)

<a href="https://www.buymeacoffee.com/ifeanyichima" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
Webflow -- Broken editor elements
Published: 2022-07-29 13:36:26

## Bookmark Card

[https://storychief.io](https://storychief.io)

## Apple Podcasts

[https://podcasts.apple.com/be/podcast/the-growth-through-content-show/id1551644553?i=1000513285449](https://podcasts.apple.com/be/podcast/the-growth-through-content-show/id1551644553?i=1000513285449)

## Gallery

<picture><figure><img src="https://d2wvyaiai4v4wx.cloudfront.net/account_1/1_0a68c5763ed494ce2dd8a04c8062d3ee.jpg"/></figure><figure><img src="https://d2wvyaiai4v4wx.cloudfront.net/account_1/2_0a68c5763ed494ce2dd8a04c8062d3ee.jpg"/></figure><figure><img src="https://d2wvyaiai4v4wx.cloudfront.net/account_1/3_0a68c5763ed494ce2dd8a04c8062d3ee.jpg"/></figure><figure><img src="https://d2wvyaiai4v4wx.cloudfront.net/account_1/4_0a68c5763ed494ce2dd8a04c8062d3ee.jpg"/></figure></picture>

## TikTok embed

[https://www.tiktok.com/@ideatimes/video/7105307382951054638?is_copy_url=1&is_from_webapp=v1](https://www.tiktok.com/@ideatimes/video/7105307382951054638?is_copy_url=1&is_from_webapp=v1)

​