teleren/devto huggingface dataset:
logical operater(&&And)
Tags: beginners, javascript
Published: 2021-05-27 10:57:00

##&& (AND)##
In classical programming, AND returns true if both operands are true.otherwise its false.

alert( true && true ); // true
alert( false && true ); // false
alert( true && false ); // false
alert( false && false ); // false
e.g.
prompt(1&&0); //return 0

Now lets talk about multiple AND values:
result = value1 && value2 && value3;
The AND && operator does the following:

Evaluates operands from left to right.
For each operand, converts it to a boolean. If the result is false, stops and returns the original value of that operand.
If all operands have been evaluated (i.e. all were truthy), returns the last operand.

e.g.
prompt(null && 1 && 2);// output is null.
prompt(1 && 2 && "ppp");// output is ppp.

let person1=0;
let person2;
let person3='talha';
alert(person1||person2||person3||'no one');*
above output is 0.
Docker fails with OCI runtime create failed
Tags: docker
Published: 2021-05-27 10:45:06

## The Problem

> docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "/hello": stat /hello: no such file or directory: unknown.

if you try the simples possible image and get this error you have found the information to solve your problem.

```bash
docker run hello-world
```

```
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b8dfde127a29: Pull complete 
Digest: sha256:5122f6204b6a3596e048758cabba3c46b1c937a46b5be6225b835d091b90e46c
Status: Downloaded newer image for hello-world:latest
docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "/hello": stat /hello: no such file or directory: unknown.
```

## Solution

open `/etc/systemd/system/docker.service` in your editor and remove `MountFlags=slave` from the file:
```
[Service]
ExecStart=/usr/bin/docker daemon -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --storage-driver aufs --tlsverify --tlscacert /etc/docker/ca.pem --tlscert /etc/docker/server.pem --tlskey /etc/docker/server-$
MountFlags=slave
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity
Environment=

...
```

**reload** the systemd configuration
`systemctl daemon-reload`

**restart** docker
`systemctl restart docker`

Test again with `docker run hello-world` which should give you:
```
Hello from Docker!
This message shows that your installation appears to be working correctly.
...
```

## Explaination

The `MountFlags=slave` is no longer needed [Docker Release Notes 18.09.1](https://docs.docker.com/engine/release-notes/18.09/#18091)
Shopware Migration Service
Published: 2021-05-27 10:28:37

<p><strong>Get A Complete Migration Solution</strong></p>
<p>Migration from another eCommerce platform to Shopware is complex but is an excellent decision because of the rich features and facilities offered by Shopware. At <a href="https://shopwaresquad.com/migration-and-upgrade/">Shopware Squad</a>, we ensure your Shopware migration is done perfectly without impacting your store&rsquo;s data and SEO rankings. Our creative designers and skilled developers provide bug-free migration to Shopware.</p>
<p><strong>Our Expertise</strong></p>
<ul>
<li>OpenCart to Shopware</li>
<li>Shopify to Shopware</li>
<li>OsCommerce to Shopware</li>
<li>BigCommerce to Shopware</li>
<li>PrestaShop to Shopware</li>
<li>Zencart to Shopware</li>
<li>Drupal to Shopware</li>
<li>WordPress to Shopware</li>
<li>WooCommerce to Shopware</li>
<li>3DCart to Shopware</li>
<li>Sylius to Shopware</li>
<li>Joomla to Shopware</li>
<li>BigCart to Shopware</li>
</ul>
<p><strong>Why Move to Shopware?</strong><br /> <br /> Is it worth investing in migration? Few reasons why you should migrate to Shopware?</p>
<ul>
<li>Highly flexible thanks to the API first approach</li>
<li>Comparatively affordable prices</li>
<li>Developed in collaboration with retailers</li>
<li>The perfect combination of content &amp; commerce</li>
<li>Wide range of features and functionalities.</li>
<li>Quick setup and implementation of the store.</li>
<li>Open source under MIT license.</li>
</ul>
<p><strong>Why Should You Choose Us for Your <a href="https://shopwaresquad.com/migration-and-upgrade/">Shopware Migration</a>?</strong></p>
<ul>
<li>We have successfully migrated 20+ stores in Shopware from other eCommerce platforms.</li>
<li>Your data is completely safe during migration.</li>
<li>Our only experienced developers will handle your migration project.</li>
<li>The perfect combination of content &amp; commerce</li>
<li>During the migration process, we ensure that your site won&rsquo;t go down.</li>
<li>Our migration process is speedy, convenient and we deliver before estimated time.</li>
</ul>
<p>Let&rsquo;s discuss your <a href="https://shopwaresquad.com/migration-and-upgrade/">Shopware Migration</a> requirement!</p>
<p>&nbsp;</p>
The wavy dot operator
Tags: javascript, proposal, discuss
Published: 2021-05-27 10:07:16

What do you think about the [wavy-dot operator](https://github.com/tc39/proposal-wavy-dot) proposal?

{% github https://github.com/tc39/proposal-wavy-dot %}

To sum up the wavy-dot is a new operator `~.` to use on PromiseLike object to wave the Promise to the properties of the value resolved by the Promise.
It always return a Promise how will resolve (or reject) with the result of the operation after the dot.

The available operation are
* property access, using both [] and property name
* method/function call

For example:
```javascript

const asyncArray = new Promise((resolve) => resolve([1, 2, 3, 4]))

// Without the wavy-dot operator
console.log((await asyncArray)[0])  // => log: 1
console.log((await asyncArray).length)  // => log: 3
console.log((await asyncArray).join('-'))  // => log: 1-2-3

// With the wavy-dot operator
console.log(await asyncArray~.[0])  // => log: 1
console.log(await asyncArray~.length)  // => log: 3
console.log(await asyncArray~.join~.('-'))  // => log: 1-2-3
```

Do you think it's useful?
How I write Review comments
Tags: career
Published: 2021-05-27 09:50:15

Feelings are fragile things, they hurt and break easily! Your feelings are a direct path to your ego, and I'm not going to lie and say you don't have an ego, we all do, accept it, you can be hurt by what people say. But the goal of a code review is NOT a slagging match to see who knows the most clever way to do something, it's a means to understand how tho code (at this point is a separate person who we all hate) could be better at doing what ever it is it's meant to do.

So beat up your code, accept the promise that the person tearing up your code, means we'll, the more they tear, the more they mean well, and yes it's mean but it's the code that's getting a beating, not you.

Unless you are the CEO, your code is not "your code" it's company property, so for the betterment of everyone take everything as if it where a complement.
Your data are Gold 💰
Published: 2021-05-27 09:23:15

Elise is on fire 🔥

In the last episode of Cash Investigation, Elise Lucet hit hard again.

We learn that data brokers, large-scale personal data sellers, are a reality. 

And that they resell data that has been aggregated without our consent.

They are hiding behind anonymization, but a research team in England has shown us that this does not make things less complicated to find people very precisely.

In short, a very interesting episode that we had to talk about.

{% youtube lNBl4W6-jys %}


---

*If you like this content, push the like button, that helps spread the message.* 👍🏼
*If you think it can be useful to anyone in your network, share it.* 📨

---

Video produced by [Wild & Secure](https://wildnsecure.com), your consulting firm to all things security and real estate.
If you want to receive weekly quality content about security, subscribe to our newsletter on our website. [https://wildnsecure.com](https://wildnsecure.com)
Logical operators(|| OR)
Tags: beginners, javascript
Published: 2021-05-27 09:20:00

###|| (OR)###
the logical OR Return true If any of its arguments are true otherwise it returns false..
e.g.
alert( true || true );   // true
alert( false || true );  // true
alert( true || false );  // true
alert( false || false ); // false

If an operand is not a boolean, it’s converted to a boolean for the evaluation.

For instance, the number 1 is treated as true, the number 0 as false
e.g.
if (1 || 0) { 
  alert( 'truthy!' );
}
in above the output is truthy.cause true||false return True.

Now lets talk about multiple OR’ed values:
result = value1 || value2 || value3;

The OR || operator does the following:
Evaluates operands from left to right.
For each operand, converts it to boolean. If the result is true, stops and returns the original value of that operand.
If all operands have been evaluated (i.e. all were false), returns the last operand.
e.g.
alert(''||0||1);//return 1 which is first truthy value
alert(null,0,undefined);// all falsy ,return last value.
*
let person1='';
let person2;
let person3='talha';
alert(person1||person2||person3||'no one');*
above output is talha.
The collection reference method *.valueChanges(...) visualized (and explained)!
Tags: firebase, firestore, angular, typescript
Published: 2021-05-27 09:15:29

Context 
Building a kanban board at workshop at Google I/O 2021 [Building a web application with Angular and Firebase](https://developers.google.com/codelabs/building-a-web-app-with-angular-and-firebase#7) presented by Mark Thompson. 

| Angular 12.0.1 | firebase 9.11.0 | Node 14.17 |

Taking Mark's instruction a bit further; to achieve drag&drop in a bit more realistic situation, calling the store in a service asynchronously. To achieve this status, I stumbled on the **.valueChanges(...)** method.

The internal firestore documents explains the working of this **.valueChanges(...)** method as it listen to all documents in the retrieved collection and queries this list as an Observable. 
This method provides the option of setting the **idField**. When the **idField** option is provided like 
**.valueChanges({idField: '<a-property-of-the-document'})** it means that the document ID (actually the document's name) will be mapped to the provided property being one of the properties within the document-object.

Know the construction of the document, in this case **document (ITask) = { id?: string; title?:string; description?: string'; }**. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nam2qdj6ytz2uj0jpp6a.png)
The interface used to obtain documents within the collection (must) contain an optional property <property?>.

When calling the **.valueChanges(...)** method with a provided **idField**, which is set to one of the provided properties as stated, internally, the ID (actually the document's name) of that document is mapped to the 'provided'-property within the document object. 
See
gif
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/irrue3pn7mjiztkso6ir.gif)

The service
Notice: No need of using *snapshotChanges()* as stated elsewhere.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dht23mvjv7ag9mrxwfti.png)
Are we going into codeless future ? 
Published: 2021-05-27 08:27:15

Yesterday I visited a Meetup hosted by Wix https://youtu.be/_Xf3M2s4KG0?t=3069 

To summarise, existing development/packaging/hosting technics are not able to keep up with the velocity of business demands that Wix is facing, so they are trying to develop a platform that would be at the highest level of abstraction, developers writing only business logic code, with deployments times at the level of seconds and maximizing of the utilization of resource. The solution is cohosting functions written in JS by different people/groups inside the same process, providing higher-level Wix-specific APIs for interacting and deploying them without any dependencies or packaging.  
While the individual choices they made can be debated, the more interesting question is the software world is going in the direction they took? 

I think it connects to the NoCode/LowCode buzz that going on now for a couple of years.
If yes, developers of tomorrow would be separated into two groups, one enormous consisting of today business operation people who are going to write in DSL for highly abstract platforms like Wix and another much smaller in numbers even smaller than today software development community who is going to develop and maintain these abstract platforms.
What does it mean for our careers if we want to keep enjoying high salaries? Should we seek to dig deeper into the internals to be in that small group of platform maintainers, or the real money would be in the creative usage of business DSL?

I vaguely remember VB and PowerBuilder days from the start of my career. At the time, people who specialized in business-centric development in these environments became quickly irrelevant as technology moved to the internet and were basically unhirable without massive relearning. So I myself have a somewhat skeptical and cynical view of such efforts. I prefer to have highly transferable skills, and being a single company business logic developer has limited value to the outside world. Still, maybe I am just letting my basis unchecked.
Cron Job Tutorials - How to set up cron job for CiviCRM?
Published: 2021-05-27 08:27:03



I installed CiviCRM on my server, and I want to set up a cron job to trigger CiviCRM's cron job script. What should I do to set up the cron job?

https://www.easycron.com/cron-job-tutorials/how-to-set-up-cron-job-for-civicrm

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oo1yc9nqxxk098zve6tt.png)
eSigning - Barcode signature
Tags: csharp, dotnet, esignature, barcode
Published: 2021-05-27 08:26:45

In this post, we'll explore an eSigning API that allows to add barcode signature(s) within a document. 
**Supported Barcode Types**
- Codabar
- Code128
- Code39Standard
- Interleaved2of5
- DutchKIX
- DotCode
- EAN8

Please have a look at this full [list](https://apireference.groupdocs.com/signature/net/groupdocs.signature.domain/barcodetypes/fields/index) of supported barcode types.
To specify different options for Barcode signature, [GroupDocs.Signature](http://products.groupdocs.com/signature) API provides *BarcodeSignOptions* class. 
So, basically you have to specify Encode type and text. Please have a look at the following code snippet:

```csharp
using (Signature signature = new Signature("sample.pdf"))
{
    BarcodeSignOptions options = new BarcodeSignOptions("JohnSmith")
    {
        // setup Barcode encoding type
        EncodeType = BarcodeTypes.Code128,
        // set signature position
        Left = 100,
        Top = 100
    };
    signature.Sign("SampleSigned.pdf", options);
}
```

This is how output will look like and you can get the encoded information just by scanning the Barcode. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y4cr21lsmh33q4a4iuv6.PNG)
Autocad course in Ahmednagar
Published: 2021-05-27 08:20:33

<a href="https://www.sevenmentor.com/autocad-training-in-ahmednagar" rel="nofollow">
Autocad classes in Ahmednagar</a>
Architects, engineers, and construction professionals in particular are sure to learn invaluable info regarding this industry standard application. Autodesk has continually developed its stage, evolving it into a very strong design and modeling tool. AutoCAD Training in Ahmednagar, you will find everything from the principles to expert-level implementation. We now have a committed Placement service team which helps students in securing placement according to their needs.
<a href="https://www.sevenmentor.com/autocad-training-in-ahmednagar" rel="nofollow">
Autocad Course in Ahmednagar</a>
<a href="https://www.sevenmentor.com/autocad-training-in-ahmednagar" rel="nofollow">
Autocad Training in Ahmednagar</a>
Create a User Group In AWS IAM
Tags: aws, cloud, beginners
Published: 2021-05-27 08:15:30

In the last post we created a user but now we create user groups. User groups are used to manage AWS a group may contain certain permissions and everyone belonging to that group has the same permissions. AWS allows a user to be added to multiple groups.

Lets create our first group

- Go to AWS IAM console same as in the [last article](https://dev.to/ajitsinghkaler/create-a-user-in-aws-iam-al3).

- After that select user groups from the sidebar.
![Select User Group](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cr38vm8b9cqzbz2nz9vv.png)

- Click on create group to create a new group.
![Create group option](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/59heoxox9qoxf5r36jsb.png)

- Select the name of the group, the users you want to add to the group and the policies you want to attach to this group and click on create group. A group is created.
 ![Create group instructions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xvhubuo67d3koz301qbt.png)

- Now you can add or delete users from a group by clicking on that group and adding users to it using the add users option.

![Deatil group view](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z0rqa29jsid1px78uvl7.png)

![Add user to group](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vnu6sh7d1uyxtai1zg7j.png)
Autocad classes in Ahmednagar
Published: 2021-05-27 07:55:13

Architects, engineers, and construction professionals in particular are sure to learn invaluable info regarding this industry standard application. Autodesk has continually developed its stage, evolving it into a very strong design and modeling tool. AutoCAD Training in Ahmednagar, you will find everything from the principles to expert-level implementation. We now have a committed Placement service team which helps students in securing placement according to their needs.
There are huge <a href="https://www.sevenmentor.com/autocad-training-in-ahmednagar" rel="nofollow">
Autocad classes in Ahmednagar</a>
 to satisfy the growing corporate demands. We utilize international course materials and syllabus to our pupils, Our coaches have many years of expertise in Industries. SevenMentor provides the best AutoCAD Training in Ahmednagar . AutoCAD is a commercial computer-aided design (CAD) and drafting software application. Developed and promoted by Autodesk. AutoCAD is used across a broad selection of Mechanical industries, by Architects, Project supervisors, Engineers, Graphic Designers, Town planners and many other professionals. AutoCAD Courses in Ahmednagar provides the Placement and helps in major companies. Step into our Office to discover the list of Companies our Students are put. Our modules provide end to finish practical oriented training pointing to real -- world problems that assist students to have professional exposure to fit at any sort of working environment. SevenMentor offers a wide range of AutoCAD training in Ahmednagar and helps to get hired in top notch companies.

<a href="https://www.sevenmentor.com/autocad-training-in-ahmednagar" rel="nofollow">
Autocad classes in Ahmednagar</a>
<a href="https://www.sevenmentor.com/autocad-training-in-ahmednagar" rel="nofollow">
Autocad Course in Ahmednagar</a>
<a href="https://www.sevenmentor.com/autocad-training-in-ahmednagar" rel="nofollow">
Autocad Training in Ahmednagar</a>
How is Udacity Data Analyst Nanodegree?- Latest Review 2021
Tags: datascience, analytics, analyst, machinelearning
Published: 2021-05-27 07:53:45

Do you have a question, **“How is Udacity Data Analyst Nanodegree?“**🤔… If yes, then this article will help you and clear your doubts. In this article, you will get to know all details regarding **Udacity Data Analyst Nanodegree**. So give your few minutes to this Udacity Data Analyst Nanodegree Review to get your answer.

##**How is Udacity Data Analyst Nanodegree?**

The answer depends upon various factors like the **projects covered, quality of the content, the support provided, time to complete, price of the Nanodegree program, and the instructors**. And I have covered all these factors in this article to answer this question, “How is Udacity Data Analyst Nanodegree?“.

Now without any further ado, let’s get started-
**[Click to continue reading...](https://www.mltut.com/how-is-udacity-data-analyst-nanodegree/)**
Prevent unnecessary renders (React.memo)
Tags: react, webdev, womenintech
Published: 2021-05-27 07:44:55

**React.memo** is helpful in, preventing unnecessary renders, 
in the below snippet, I'm using *React.memo* this component will only be rendered when the component gets mounted and if the props  *quantity* changes otherwise it'll keep displaying the previously rendered component.
But if the *Cart* component itself has some state or using useState, useContext, useReducer it will surely be rendered.
``` javascript
//Cart.js
const Cart = ({ quantity }) => {
  console.log("Rendered Cart!");
  return <>Number of item is {quantity}</>;
};
export default React.memo(Cart);
```
In the below snippet, the *Cart* component is being rendered and we are passing in *quantity* as props, so whenever one clicks on the *quantity* button, the *Cart* component will be re-rendered but won't get re-rendered when you type in something in the *search* text box.
``` javascript
//App.js
import Cart from "./Cart";

import { useState } from "react";
export default function App() {
  const [quantity, setQuantity] = useState(0);
  const [search, setSearch] = useState();
  return (
    <div className="App">
      <Cart quantity={quantity} />
      <hr />
      <label>Quantity </label>
      <button
        onClick={() => {
          setQuantity(quantity + 1);
        }}
      >
        {quantity}
      </button>
      <hr />
      <label>Search </label>
      <input
        onChange={(event) => {
          setSearch(event.target.value);
        }}
      ></input>
    </div>
  );
}

```
Integrate Laravel with Xero
Published: 2021-09-18 17:48:26

---
title: Integrate Laravel with Xero
published: true
date: 2021-05-27 07:43:11 UTC
tags: 
canonical_url: https://dcblog.dev/integrate-laravel-with-xero
---

I've created a video showing how to integrate Laravel with Xero using my Laravel Xero package available at [https://dcblog.dev/docs/laravel-xero](https://dcblog.dev/docs/laravel-xero)

<iframe frameborder="0" height="315" src="https://www.youtube.com/embed/sORX2z-AH1k" title="YouTube video player" width="560"></iframe>

If you like the video please like and [subscribe](https://www.youtube.com/channel/UCnRtlv5OYnbgIaXSlf-gSmA)