teleren/devto huggingface dataset:
Introducing TiLiShop
Published: 2020-09-05 19:30:13

---
canonical_url: https://tilishop.com/blog/news/introducing-tilishop/
---

**Create an online shop, sell your products and build a successful business. TiLiShop is made for designers, makers, artists and indie brands.**

That sums it up in two sentences. But there is a lot more to it, of course. We're not building *yet another shopping cart*; this is the result of more than half a decade of research and more than fifteen years of hands-on experience building online shops for ourselves and other artists, makers, designers and small creative companies.

## A little History
The first time we spoke about building TiLiShop was roughly seven years ago. We created the branding, a name and a website, and we were ready to start building. But then we realised we lacked fundamental expertise to build a strong product.

A bit of research would benefit the product considerably. So the decision was made to postpone and gather more information.

## A <del>little</del> lot of Research
Fast forward five years to December 2018, and we felt finally ready to push ahead. We gathered the necessary funds and learned a lot about the real needs of running a small online business.

In the meantime, we had worked together with goldsmiths, architects, furniture designers, industrial designers and an online printing company, and gained invaluable real-world insights.

Additionally, we experimented ourselves by launching various mini brands. We designed and produced a series of ceramic vessels, set up an accessory line, did a pop-up gallery for a year in Barcelona and created an art print shop.

What started as an intention to do a bit of research, ended up being five years of it. It took a lot more time than we anticipated, but TiLiShop will benefit from it, for sure.

## Approaching Completion
Now, after two years of hard work, the product is almost ready. In a few months, we'll start handing out beta free accounts to anyone genuinely interested.

These are exciting times for us. So much of our time and effort has gone into building a fabulous product, and we can't wait to show you.

Be sure to [register for the free beta](https://tilishop.com/preregister/), because early access will be limited!
Turf.js to php
Tags: turfjs
Published: 2020-09-05 19:20:36

Problem: Turfjs works well for client-side but I wanted to use it in server-side
Recently I had to check if a point lies inside of the polygon.

I was using spatial data in mysql. Mysql provides way(ST_Contains and some other ways) to check if a point lies in a polygon. But unfortunately it was not scanning all the rows.

I found turf.js was able to do this properly:
Here's I have used this with mapbox:https://sahilkashyap64.github.io/USA-zipcode-boundary/mapbox+turf2.html
```
var point = turf.point([lon, lat]);
const PointwithinFeatureCollection = (point) => {
	var ptsWithin, found = false;
	var zip = false;
	turf.featureEach(data, function (currentFeature, featureIndex) {

		var geom = turf.getType(currentFeature)
		console.log('geom', geom);
		if (geom == 'MultiPolygon') {

			let coordinates = turf.multiPolygon(currentFeature.geometry.coordinates);

			ptsWithin = turf.booleanPointInPolygon(point, coordinates);
			console.log("Found in Multipolygon: : ", ptsWithin);
			if (ptsWithin) {
				zip = currentFeature.properties.title;
			}


		} else if (geom == 'Polygon') {
			let coordinates = turf.polygon(currentFeature.geometry.coordinates);
			found = turf.booleanPointInPolygon(point, coordinates);
			console.log('found', found);
			if (found) {
				zip = currentFeature.properties.title;
			}
		}
	});
	if (zip === false) {
		return {
			"success": false,
			"message": "Not within zipcode boundary",
			"response_code": 403
		};
	} else {
		return {
			"success": true,
			"data": zip,
			"message": zip + " Zipcode is allowed.",
			"response_code": 200
		};

	}
};
PointwithinFeatureCollection(point);
```
HERE'S THE PHP CODE:
{% gist https://gist.github.com/sahilkashyap64/934ac819b21bcf95751452711dd69944 %}
Here's what I did to convert this code in php:-

1)I manually wrote all the turf function I was using.

2) Extracted those methods from the js file and wrote them in seperate js file. eg: point ,getType,featureEach,multiPolygon,polygon,booleanPointInPolygon I found these function is turf/helper,turf/invariant,turf/meta

3. I used "npm install -g javascript-to-php" and then this 
js2php myfile.js > myfile.php


Note:You will have to manually edit some generated code and If you try to convert whole turf index.js sometimes it generates error
After Pushing a Array Element in react.js it's looping infinitely in useEffect. Help plz
Tags: react
Published: 2020-09-05 19:15:22

I have pushed some image elements in object array it's working fine but how to update the state?

```
const url = "https://jsonplaceholder.typicode.com/posts";
        const [posts, setPosts] = useState([]);
    
        const postsMap = posts.map(post => {
            return {...post, "image": `image-${post.id}.jpg`}
        })
    
        console.log("Added Post Image", postsMap);
    
        useEffect(()=>{
            fetch(url)
            .then(res => res.json())
            .then(data => {
                setPosts(data)
                console.log(data);
            })
            
        }, [postsMap]);
```
Use JS to live-filter an HTML list - Part 2
Tags: javascript, filter, search, frontend
Published: 2020-09-05 18:34:14

---
title: Use JS to live-filter an HTML list - Part 2
published: true
description: Filter items on search criteria or filter events by date using JavaScript on a static page
tags: javascript,filter,search,frontend
cover_image: https://unsplash.com/photos/WVl1N2C2zEA/download?force=true&w=1920
series: JS live-filter
---

> Filter items by search criteria or by date using JavaScript on a static page ⏳

## Plain JavaScript approach ☕️

Here I cover how to live filter HTML elements using plain vanilla JavaScript.

When I went on tour in 2019 with my band, "The Buckfever Underground", we have had a long list of upcoming shows on our homepage. We did 21 shows in 16 days... that was crazy and exhausting but epic. Here's our latest album if you want to hear what improvized music with spoken world sounds like [The Last Days of Beautiful](https://thebuckfeverunderground.co.za/music/last_days_of_beautiful/).

I knew that the concert list would be frozen on the day I built the Jekyll site and would not auto-update. So I decided to add JS filtering on the frontend to make it dynamic.

I setup my data in an **array** of key-value pairs. Here is a shortened version:

```javascript
var tour = [
    {
        date: "2019-04-11",
        title: "Stellenbosch – Trude Gunther se huis",
    },
    {
        date: "2019-04-12",
        title: "Bainskloof (Wellington) - McBains",
    },
    // ...
    {
        date: "2019-04-26",
        title: "Evening: Cape Town - Alma Café",
    }
];
```

And then I filtered the array, only rendering the element if the date of the concert was _on_ or _after_ the current date, so that that the list would get shorter which each passing day. 

```javascript
var today = new Date();
// Fix today's time at midnight.
today.setUTCHours(0, 0, 0, 0);
var upcomingShows = tour.filter(show => new Date(show.date) >= today);
```

Since JS runs in the browser on page load, the value of "today" will always be up to date, compared with a static build where `today` is setup once and then left.

Here's the full solution on GitHub. [show_list.html](https://github.com/MichaelCurrin/the-buckfever-underground/blob/master/_includes/show_list.html)

I found that this solution worked really well. 

I was able to test it locally as well, by hard-coding past and future dates in place of today, so I can see that it actually works.

Continue on to [Part 3 - Use a JavaScript library](https://dev.to/michaelcurrin/use-js-to-live-filter-an-html-list-part-3-o1g).
Use JS to live-filter an HTML list - Part 1
Tags: javascript, filter, tutorial, beginners
Published: 2020-09-05 18:34:09

---
title: Use JS to live-filter an HTML list - Part 1
published: true
description: Filter items on search criteria or filter events by date using JavaScript on a static page
tags: javascript,filter,tutorial,beginner
cover_image: https://unsplash.com/photos/WVl1N2C2zEA/download?force=true&w=1920
series: JS live-filter
---

> Filter items by search criteria or by date using JavaScript on a static page ⏳

In this 3-part series, I'll show you how to add a sprinkling of HTML and JS for filtering to get interactivity and "liveness" on static HTML pages.


## What are the use-cases? 🔭

- You want to write **future-dated blog posts** that only become visible to users on or after the **publish date**, without updating your HTML by hand or redeploying your statically-generated blog.
- You want list of **upcoming events** that is always up to date and doesn't show past events.
- You have a list or table of items like repos or books and you want to filter items by **name** as the users enters input in a **search bar**, without using a submit button.
- You also want to let the user filter and sort by **star** count, in addition to name.


## Frontend vs server-side filtering 🔁

The **frontend filtering** solution I cover here works for any HTML page and even a one-page HTML site. 

This approach it works particularly well if you have a statically generated site built with [Jekyll](https://github.com/MichaelCurrin/jekyll-blog-demo), [Hexo](https://github.com/MichaelCurrin/hexo-quickstart), Vuepress or Gatsby. Since the content is rendered to HTML at build time and we can add JS to make it dynamic.

This frontend approach on local data works without the user having to reload the page and having to do an API request. And this means you don't have to rewrite your entire static site to use Node.js/Express, Python/Flask or PHP.

## Show me how! 👨‍🏫

Okay, on to the code... 👨‍💻

Here are the blog posts in this series - they include code samples and explanations on how to set this up on your project.

Continue on to [Part 2 - Use plain JavaScript](https://dev.to/michaelcurrin/use-js-to-live-filter-an-html-list-part-2-4fpg).
__ini__ tutorials of “in the console” really mess up REAL WORK
Tags: django, python, help, class
Published: 2020-09-05 18:30:54

So, I’ve been stuck with showing data from my database. 
ITS BECAUSE IT HAD TO BE __init__ to show! 
No one could answer that question. 

I don’t get it. Why is it it 5 steps to do one thing vs using React or Vue? 
I get the functionality of Django.... but it’s weird how you have to do allot more.
📺 AWS News - Episode 2
Published: 2020-09-05 18:20:30

{% youtube dBkqCQurYwg %}

#### In this episode:
★ Amazon EBS New Volume Type (io2)
- https://aws.amazon.com/blogs/aws/new-ebs-volume-type-io2-more-iops-gib-higher-durability/

★ Amazon Route 53 Resolver Query Logs
- https://aws.amazon.com/blogs/aws/log-your-vpc-dns-queries-with-route-53-resolver-query-logs/

★ Bottlerocket OS
- https://aws.amazon.com/about-aws/whats-new/2020/08/announcing-general-availability-of-bottlerocket/

★ Amplify & Workspace Resource Tagging
- https://aws.amazon.com/about-aws/whats-new/2020/09/amplify-cli-supports-tagging-resources-project-level/
- https://aws.amazon.com/about-aws/whats-new/2020/08/amazon-workspaces-enables-aws-resource-groups-tag-editor/

★ Amazon Textract Supports AWS PrivateLink
- https://aws.amazon.com/about-aws/whats-new/2020/09/announcing-aws-privatelink-support-amazon-textract/

★ AWS leads again!
- https://aws.amazon.com/blogs/aws/aws-named-as-a-cloud-leader-for-the-10th-consecutive-year-in-gartners-infrastructure-platform-services-magic-quadrant/

- - -

### For more AWS news from around the cloud, please follow, clap & [subscribe to the channel](https://www.youtube.com/channel/UCo6iCvAfqVvxKfYmJmJCB7g)!
QR based Event Registration Application
Tags: showdev, reactnative, firebase, qrcodes
Published: 2020-09-05 18:07:50

I've been a part of many college events, workshops and seminars. While they have been amazing, their registration process has always been on pen and paper. This makes it difficult to keep track of the number of registrations and the data of those who have registered. The sheet can get lost or torn. 

To solve this issue and make the whole process of registrations easier, I've developed an Android app to manage registrations using QR codes.

Tech stack used -
- React Native
- Firebase 

I prefer keeping it open-source so other interested developers can contribute and hence more people can benefit from it.

The demo apk can be found here - https://drive.google.com/file/d/1Yul7poaKJm7T3Z9q-jDp2DRR8NmTn2A1/view?usp=sharing

Live demo - https://www.linkedin.com/posts/shamoilarsi_github-reactnative-firebase-ugcPost-6707919741593415680-fYWw

Github Repository - https://github.com/shamoilarsi/QR-Event-Registration

PS - Some work is left on the UI of the app.
Understanding Dependency Injection with Chicken Cutlets
Tags: beginners
Published: 2020-09-05 17:55:59

## The Backstory

So I started a new job. I'm learning a new programming language and framework. And my brain is fried.

As a form of stress relief, I spent the entirety of my lunch breaks obsessively watching Nigella Lawson's cooking shows - without the intention of following her recipes, of course! During this past week, I _also_ needed to understand the concept of dependency injection to complete my day-to-day work. By doing both things at the same time, I ended up understanding dependency injection by frying my brain... and some chicken cutlets.

## Let's Get Cooking

At a minimum, I'll need:

* 2 chicken escalopes
* 1 egg

Well, I _could_ get these ingredients by farming some chickens and harvesting eggs in my backyard. But, what if I suddenly decided to cook with another breed of chickens? I can't just trade my whole flock of chickens for another! That would be a disaster!

![chicken farm](https://dev-to-uploads.s3.amazonaws.com/i/mt3zgqwgig92litb0gzn.jpg)

Instead of farming my own chickens, why don't I _buy_ some chickens from the farmer's market? I'm now free to switch between chicken breeds whenever I like! Plus, I don't have the hassle of rearing chickens in my nonexistent backyard.

In the programming world, this concept is called **inversion of control**, or **IoC** for short. I don't have control over growing my own chickens, because I hate the idea of opening a chicken farm. Instead, I'm delegating that task to other farmers, so all I have to do is buy their produce. I make sure to only do one thing: cook the chickens. 

**Dependency injection**, in this example, refers to the act of buying chicken escalopes from the farmer's market and then "injecting" that ready-made ingredient into our cooking, instead of making it from scratch.

And that's it! Now, it's time to eat.

## Acknowledgements

* Pictures from [here] (https://cdn-image.myrecipes.com/sites/default/files/styles/4_3_horizontal_-_1200x900/public/crispy-chicken-cutlets-butter-chive-pasta-ck.jpg?itok=M-VG2KEr) and [here] (https://nelsontractorco.com/wp-content/uploads/poultry-farm.jpg)
* Credits to [Nigella Lawson's chicken cutlet video](https://www.youtube.com/watch?v=gJZErENV77w) for inspiring me to write this post!
Setting environment variables to your container
Tags: docker, container, tutorial, node
Published: 2020-09-05 17:07:57

In this post, we'll learn how to set environment variables in docker containers. Often things like password, environment configurations, API credentials etc are not checked in the repositories as a security measure. These are set in environment variables, from where the application reads it during the runtime. 

# Create a sample application 
For this, we'll create a simple express application which will read the environment variable and show it on the browser
 

1. run npm init to create a package json
```bash
$ mkdir test-app
$ cd test-app
$ npm init --y
$ npm install express --save
$ touch app.js
```
2. Open `app.js` and type in the following
```javascript
// app.js
var express = require("express");
var app = express();

app.use(express.json());
app.use(express.urlencoded({ extended: false }));

app.get("/", function (req, res, next) {
  res.send({ title: "Express", envVal: process.env.TESTVAL });
});

app.listen(3000, () => console.log("Running on http://localhost:3000"));
```
3. add the start script in package.json
```json
{
  "name": "express-with-env",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "start": "node app.js"
  },
  "dependencies": {
    "express": "~4.16.1"
  }
}

```
4. Run the application

>I'm using ubuntu v18 for development. If you're on windows, you may need to set the env variable in a slightly different way.

```bash
$ TESTVAL=QWERTY npm start
```
Now if you open http://localhost:3000 in the browser, you would see
```json
{
"title": "Express",
"envVal": "QWERTY"
}
```

# Create the docker image
Let's create a Dockerfile, parallel to your packageJSON
```bash
$ touch Dockerfile
$ touch .dockerignore
```

Lets now open Dockerfile and add these entries into it.
```docker
FROM node:12-slim
WORKDIR /app
COPY ./package*.json ./
RUN npm install
COPY ./ ./
EXPOSE 3000

# Run the code
CMD [ "npm", "start" ]
```

Build the docker image from the Dockerfile
```bash
$ sudo docker build -t test-image .
```

## Finally run the image with an entrypoint 
```bash
$ sudo docker run -e "TESTVAL=Docker with env variable" -p 3000:3000 -d test-image
```
if you now open http://localhost:3000 in a browser, you'll get
```json
{
"title": "Express",
"envVal": "Docker with env variable"
}
```

Let spin up another container from the same image
```bash
$ sudo docker run -e "TESTVAL=Another Docker Container from the same image" -p 4000:3000 -d test-image
```
if you now open http://localhost:4000 in a browser, you'll get
```json
{
"title": "Express",
"envVal": "Another Docker Container from the same image"
}
```

### PS:
Often enterprises have multiple prod and non-prod environments to support. Each environment often have different configurations, but your code must follow the strategy **build once deploy anywhere**. With this tutorial, you'll be able to do that effectively.
List Of Vulnerabilities faced by Android Applications | 2020
Tags: devops, android, beginners
Published: 2020-09-05 17:04:20

Android application vulnerabilities have become a problem because of Google Play’s open format, and also because users can sideload apps, removing any oversight regarding the safety of apps.

There are also updates and patches to the Android operating system. You can’t count on Android to update itself in a timely manner, because wireless carries control update schedules on all but Google’s Pixel devices.

Expert testing of Android mobile applications shows that in most cases, insecure data storage is the most common security flaw in android apps. According to a report, Vulnerabilities and Threats are slightly more common in Android applications, compared to iOS counterparts(43% vs 38%). But the experts categorize this difference as minimal: the security level of apps is roughly equivalent between the two platforms.

Comprehensive security checks of a mobile application include a search for vulnerabilities in the client and server, as well as data transmission between them.

Android App Vulnerabilities
Mobile apps are seeing huge growth in development. Many of these systems have a client-server architecture. The client runs on the Android or iOS operating system, which is most widely used. This client is downloaded from the app distribution sites to the user, where developers are publishing their wares.

As viewed from the user’s point of view the mobile program is the client installed on the smartphone. The user communicates with that to make transactions, pay bills, or read emails. But there’s actually another aspect as well: the server, which the developer hosts.

Current smartphone operating systems come with complex security mechanisms. By default, an installed device can only access files in its own sandbox folders, and user rights do not allow files to be modified from the system. Nonetheless, developer mistakes in developing and writing code for mobile apps create security vulnerabilities and attackers can exploit it.

A mobile application’s extensive security tests include a scan for client and server vulnerabilities, as well as data transfer between them. We will address risks to users including risks from contact between the client and server sides of mobile apps.

Top 7 vulnerabilities

Binary Protection
Insufficient Transport Layer Protection
Insufficient Authorization/Authentication
Cryptography-Improper Certificate Validation
Brute Force – User Enumeration
Insufficient Session Expiration
Information Leakage- Application Cache

To Know About the vulnerabilities in more depth check this article - https://codersera.com/blog/top-7-vulnerabilities-in-android-applications-2019/
Daily Challenge #287 - 16+18=214
Tags: challenge
Published: 2020-09-05 16:57:46

---
title: Daily Challenge #287 - 16+18=214
published: true
series: Daily Challenge
description: Forget everything you know about addition.
tags: challenge
//cover_image: https://direct_url_to_image.jpg
---
For this challenge, forget everything you know about adding two large numbers together.
![248+208=4416](https://i.ibb.co/Y01rMJR/caf.png)

Like in this photo, you'll be adding two numbers together without carrying numbers. Write a function that will take two numbers as input and will add them together without carrying. Write down every value you get.

###Examples
`2 + 11 = 13`

`16 + 18 = 214`
1 + 1 = 2
6 + 8 = 14

`122 + 81 = 1103`
1 + 0 = 1
8 + 2 = 10
2 + 1 = 3

 
###Tests
`1222 + 30277`
`1236 + 30889`
`49999 + 49999`

Good luck!
***
_This [challenge](https://www.codewars.com/kata/5effa412233ac3002a9e471d) comes from CodeChrisB on CodeWars. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
Is Bluehost Web Hosting Best Choice For You Website?
Tags: webhosting, bluehost
Published: 2020-09-07 12:45:22

---
title: Is Bluehost Web Hosting Best Choice For You Website?
published: true
date: 2020-09-05 16:57:38 UTC
tags: Webhosting,Bluehost,webhosting
canonical_url: https://codesquery.com/bluehost-web-hosting-review/
---

Bluehost is one of the most popular web hosting providers in the world and also recommended hosting by WordPress. It is founded by Matt Heaton and Danny Ashworth in 2003. It is currently hosting over 2 million domains and operates its server in-house of 50,000 square feet. In this article, I will tell you about [...]

The post [Is Bluehost Web Hosting Best Choice For You Website?](https://codesquery.com/bluehost-web-hosting-review/) appeared first on [CodesQuery](https://codesquery.com).
Show Dev.to users: We made a meeting companion app on macOS to improve remote meetings 
Tags: productivity, webdev, tutorial
Published: 2020-09-05 16:49:30

The goal is simple. Help highlight important stuff on the screen during presentations and remote sessions. Drawing on the screen and zooming any text should be easy-peasy.

Quick video link: 
https://www.dropbox.com/h?preview=MeetingNinja-Intro.mp4

AppStore Link: 
https://apps.apple.com/us/app/meetingninja/id1527536623?mt=12