teleren/devto huggingface dataset:
Can Cats Eat Bananas? Health Benefits, Side Effects And Tips..

Tags: cat
Published: 2021-09-16 14:12:18

Could felines eat bananas? All things considered, likely they can! Bananas are not under any condition poisonous for felines. You can undoubtedly offer bananas to your felines, yet just in case you are taking care of them in the control sum in their eating regimen schedule. Indeed, there is nothing off about treating your felines with the bananas until and except if they are attached to this products of the soil not flee from it. 

However, as we as a whole realize that bananas are wealthy in the sugar content, so it is consistently fitting that you should serve them in a moderate sum subsequent to counseling from the vet proficient. You should put forth the attempts to present your feline with some new organic product things so they can fail to remember the flavor of bananas. 

Are Bananas Healthy For a Pet Cat? 

Could felines eat bananas? In any case, ensure they ought to be presented with the alerts as it were. Assuming you are serving your feline with the bananas, ensure that you have completely eliminated the strip of the bananas. This is for the explanation that their stomach related framework isn't an excessive amount of sufficiently able to manage the banana strip. They can't bite the hard surface of the strip without any problem. 

What's more, the bananas are rich with the sugar content. Thusly, it isn't the case beneficial to serve them with the bananas in their eating routine every day. Likewise, a lot of additional measure of sugar content can lead your feline's wellbeing to diabetes just as corpulence moreover. These the two medical issue are an excessive amount of hazardous for your feline's wellbeing. So when you are taking care of them with the bananas, ensure you are cautious with regards to the balance sum first. 

Could Feeding Banana Upset Your Cat Stomach? 

Well assuming your feline is eating such a large number of bananas on one day, presumably there are chances that it can agitate their stomach also. Bananas are much valuable and sound for individuals on account of the dynamic type of content that is inside this organic product. You will likely be seeing so many tennis players, who are devouring bananas consistently for suffering strength and energy in their body. Your feline may be discovering a few issues in the utilization of the bananas in the event that you will make them feed the one entire banana. They may confront a state of extreme blockage.
Also Check More Read--->
https://cancatseat.info/can-cats-eat-bananas/
Everything you need to know about JavaScript Array
Tags: javascript, array, javascripttips, javascriptarray
Published: 2021-09-16 14:06:35

In this article, I will discuss everything you need to know about Array in JavaScript. So, Let’s get started 😐

#### 1. Create an Array
```javascript
// Create an array
const colors = ['black', 'white', 'green', 'blue'];
```
#### 2. Getting length of an Array 
```javascript
// Getting length of an Array 
const arrLength = colors.length;
console.log('The length of the array is = ', arrLength);
// Expected output: The length of the array is =  4
```
#### 3. Getting element by index position
```javascript
// Getting element by index position
const getValueByIndex = colors[0];
console.log('Index of first element is = ', getValueByIndex);
//Expected output: Index of first element is =  black
```
#### 4. Array indexOf() method => Used to get index of any single element
```javascript
// Array indexOf() method => Used to get index of any single element
const getIndexByValue = colors.indexOf('white');
console.log('The index of the element is = ', getIndexByValue);
// Expected output: The index of the element is =  1
```
#### 5. Array push() method => Used to add element at end of an Array
```javascript
// Array push() method => Used to add element at end of an Array
console.log('Previous array', colors);
colors.push('Orange'); // Added 13 at the end of previous array colors
console.log('Array after pushing a value ', colors);
/* Expected Output: 
Previous array [ 'black', 'white', 'green', 'blue' ]
Array after pushing a element  [ 'black', 'white', 'green', 'blue', 'Orange' ] */
```
#### 6. Array pop() method => Used to remove last element from an Array
```javascript
// Array pop() method => Used to remove last element from an Array
console.log('Array before pop', colors);
colors.pop(); // Removed last element of the array colors
console.log('Array after pop', colors);
/*Expected OutPut: 
Array before pop [ 'black', 'white', 'green', 'blue', 'Orange' ]
Array after pop [ 'black', 'white', 'green', 'blue' ] */
```
#### 7. Array includes() method => Used to check whether an array includes a certain element inside its entries, and return true or false.
```javascript
// Array includes() method => Used to check whether an array includes a certain element inside its entries, and return true or false.
const isSkyBlueAdded = colors.includes('sky-blue');
console.log(isSkyBlueAdded);
// Expected Output: false
```
Thanks for your patience 😎
Get connected with me:
LinkedIn: https://www.linkedin.com/in/softsamiul
GitHub: https://github.com/softsamiul
Spree Commerce 4.3 released!
Tags: spreecommerce, opensource, headlesscommerce, nextjs
Published: 2021-09-16 13:49:25

With this latest Spree 4.3 release, we’re going headless and API-first unlocking limitless UX customization possibilities with best-in-class decoupled JS storefronts.  

Next.js Commerce integration is already available, new built-in Pages & Navigation CMS, Product Filters configurable via Admin UI, and many other goodies inside!  

Full announcement: https://github.com/spree/spree/discussions/11339ce
Blocks, if-statements, switch (Lesson 2 with Hassan)
Tags: blocks, conditionals, switch, javascript
Published: 2021-09-16 13:44:14

###_GOOD_ _TO_ _REMEMBER__!_
__{}__ curly brackets
__[]__ square brackets
__()__ parentesis / brackets
__:__ colon
__;__ semicolon
__"__ quotes / double quotes
__'__ quotes / single quotes
__`__ back ticks



###_BLOCK_
We use it to group expressions with each other
Curly brackets (_{}_) are used for the block.
It is used with:
- if
- while
- for
- functions

###_IF-STATEMENTS_
-__if__ to specify a block of code to be executed, if a specified condition is true;
-__else__ __if__ to specify a new condition to test, if the first condition is false
-__else__ to specify a block of code to be executed, if the same condition is false;

####Example 1:
    if (condition1) {
      //  block of code to be executed if condition1 is true
    } else if (condition2) {
      //  block of code to be executed if the condition1 is false and condition2 is true
    } else {
    //  block of code to be executed if the condition1 is false and condition2 is false
    }

####Example 2:
    const condition = true

    if(condition) {
	    console.log("sant")
    } else {
	    console.log("falskt")
    } 
#####or
###_Conditional (Ternary) Operator_
    const condition = true
    condition  ? console.log("sant") : console.log("falskt")


###_Switch statement_
To select one of many code blocks to be executed.

How it works:
- The switch expression is evaluated once.
- The value of the expression is compared with the values of each case.
- If there is a match, the associated block of code is executed.
- If there is no match, the default code block is executed.

####Example 3:
    switch(expression) {
        case x:
          // code block
          break;
        case y:
          // code block
          break;
        default:
          // code block
    }



###_Math.ceil()_ _vs_ _Math.round()_

The Math.ceil() function always __rounds__ a number __up__ to the next largest integer.
* Math.ceil(null) returns integer 0 and does not give a NaN error

The round() method __rounds__ a number __to the nearest integer__.
Handling Forms in ReactJS the right way
Tags: react, beginners, javascript, forms
Published: 2021-09-16 13:37:36

Hello everyone, recently I came across a new way to handle React forms, maybe its something you know, maybe you've been doing this for years and think I am an Idiot for not knowing this earlier, but it is what it is so let's go.


## Using react forms the old way
Let's consider a simple signup form that contains only 3 fields namely username, email, and password. Here's how I used to use forms earlier.
```javascript
import React,{useState} from 'react';
const SignUp = () => {
	const [username,setUsername] = useState("");
	const [password,setPassword] = useState("");
	const [email,setEmail] = useState("");
	
	const handleEmailChange(e){
		setEmail(e.target.value);
	}
	const handlePasswordChange(e){
		setPassword(e.target.value);
	}
	const handleUsernameChange(e){
		setUsername(e.target.value);
	}
	return(
		<form>
			<input type="text" placeholder="username" onChange={handleUsernameChange} value={username}/>
			<input type="email" placeholder="email" onChange={handleEmailChange} value={email}/>
			<input type="password" placeholder="password" onChange={handlePasswordChange} value={password}/>
			<input type="submit" value="Submit"/>
		</form>
	);
}
```
Maybe you think wtf is this guy and why is the code is so bad. There's only one thing I can say to you, **sorry**. To the other people who think there's nothing wrong with the code, prepare to get your mind blown.

Let's look at the problems with the code first- 
1.  Its a lot of state variables for handling a form, especially if you think about bigger forms with 10s of fields.
2. The handleChange functions are totally redundant and can be easily refactored.

So, now let's look at the amazing code to handle forms - 
```javascript
import React,{useState} from 'react';
const SignUp = () => {
const [formData, setFormData] = useState({
	username: "",
	email: "",
	password: "",
});
	
	const handleChange=(e)=>{
		const newFormData = {
			...formData,
			[e.target.name]:e.target.value
		};
		setFormData(newFormData);
	}
	
	return(
		<form>
			<input type="text" name="username" placeholder="username" onChange={handleChange} value={username}/>
			<input type="email" name="email" placeholder="email" onChange={handleChange} value={email}/>
			<input type="password"  name="password" placeholder="password" onChange={handleChange} value={password}/>
			<input type="submit" value="Submit"/>
		</form>
	);
}
```
Beautiful code, Right? Well, when I found it I thought it was amazing and worth sharing.
But before you leave, **make sure that the ``formData``'s keys are same as the input's ``name``, else you're code won't work properly**.
___
That's pretty much it.
Thank you for reading. Bye
Meet The Tanukis: Michael Friedrich
Tags: community, gitlab, techtalks, devops
Published: 2021-09-16 13:24:05

Meet the Tanukis is a stream about the amazing Team members at GitLab. Each episode focuses on a team member discussing issues in tech that are important to them. This episode features Michael Friedrich, Senior Developer Evangelist

{% youtube 388JTsYAh9g %}

Links: 
[Everyone can Contribute Cafe!](https://everyonecancontribute.com/)
[Michael's presentation at 55:04](https://docs.google.com/presentation/d/1ydGggxiD7U1UcwVdr2Rz3ERl0UU19wsAeRmct5tcUN0/edit?usp=sharing)
[Michael's OSS journey](https://docs.google.com/presentation/d/1HnciJEQ8dDiHMaq1APg5WXA4mvcYQd9fdtvHicf-JyU/edit#slide=id.gdb238ed7ab_1_1)
[GitPod](https://about.gitlab.com/blog/2021/07/19/teams-gitpod-integration-gitlab-speed-up-development/)

[Free Licenses for Education/Research Institutions!](https://about.gitlab.com/solutions/education/join)
What Can I Do If the Redelivery Button Next to the Failed Order Does Not Work?
Tags: huawei, android, iap
Published: 2021-09-16 13:05:34

Below is an issue that was recently reported on, the developer in question wrote the below about what happened when they attempted to use the redelivery button on the failed orders report.

Our project integrated In-App Purchases. When I viewed the AppGallery Connect report, I found that there is a failed order data, and a redelivery button next to it. I thought the problem would be resolved after I clicked on the button. 
However, nothing happened after I clicked on the button. Our server did not call back the payment result to trigger the redelivery.

# Solution
In this case, you can [submit a ticket](https://developer.huawei.com/consumer/en/support/feedback/#/) to contact with our Huawei technical support.

In our own game's QQ group, I asked the SDK technical support about this case, and got a quick reply:

1. The redelivery button works when the integrated IAP SDK version is 2.X and the payment callback address has been configured for the game. Clicking on the button will trigger the payment callback on the game server. The game server then redelivers the product.
Tips: The IAP SDK 2.X will be removed from the market. If you are still using the old version, update the SDK as soon as possible.
2. If the version of the IAP SDK is 3.X or later (our integrated version is 5.0), the redelivery button does not work, and you'll need to trigger the redelivery mechanism in the following scenarios:

	When the app launches.
	When the result code -1 (OrderStatusCode.ORDER_STATE_FAILED) is returned for a purchase request.
	When the result code 60051 (OrderStatusCode.ORDER_PRODUCT_OWNED) is returned for a purchase request.

The client then calls the obtainOwnedPurchases API to query the failed order, and sends the data to the server, which will redeliver the product.

# References:

For details about the redelivery mechanism for IAP SDK 3.X or later, please refer to [Redelivery Process for Consumables](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/redelivering-consumables-0000001051356573).
Embed Prebuilt Arvia UI
Tags: webrtc, webdev, javascript, angular
Published: 2021-09-16 12:53:52

You can embed your <a href="https://arvia.tech/">Arvia</a> meeting rooms on any part of your web page using a single line of iframe embed code.
![devto-image8](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/re97h2qguzp87zs43jpj.png)

<b>When to use Arvia Embedded Pre-built UI</b>

Arvia Prebuilt is a complete, full-featured video call component that you can embed in your app or website with just a single line of code.

Time is money. If you want to embed video calls in your application, but don’t have the time or resources to develop a fully customized video chat UI, we’ve got an answer for you. Arvia’s embedded prebuilt can save you time and cut development costs.

<b>Embed Arvia Pre-built UI</b>
<b>Where to use;</b>
* You want a responsive and mobile-friendly design.
* You want to use all of the Arvia features, without going into the SDK details.
* You want to add video call support to your web pages and you do not want to deal with programming.
* No coding knowledge is required. You just need to add the required code.

<b>Arvia Prebuilt features</b>
* Ready-to-use video chat interface
* Cross-browser compatibility
* Screen sharing
* Active speaker indicator
* Text chat
* File sharing
* Take snapshots
* Change username
* Draw on camera
* Remote control
* Recording*

<b>Step-by-step guide: embed an Arvia room URL</b>
First, you’ll need to create an account and sign in to Arvia dashboard.<a href="https://arvia.tech/
 ">Sign up for free now!</a> 

On the room list page, roll over to the room item, and click on Embed button.

![devto-image9](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/95mygdrqor77aurpvv38.png)

You will see the code to add to your website.

![devto-image10](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jitk21s20mnr7h7do5wk.png)

<b>Example prebuilt UI embed</b>

*iframe src="https://arvia.chat/my-first-room?video=on&audio=on&mediaButtons=on&textChat=on&mediaMessageButtons=on&userNames=on" iframe*
 
<b>Meeting customization</b>
Meeting customization is achieved with URL parameters for each iframe instance. It’s possible for each participant in a meeting to have different parameter combinations. Learn more about combining parameters below.
Further, customize the meeting by combining parameters by using the ampersand symbol (&). The following example combines the embed with leaveButton=off and chat=on

<b>Combining parameters</b>
*iframe src="https://arvia.chat/my-first-room?leaveButton=off&textChat=on" iframe*
![devto-image11](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/70t89o4530they599ctm.png)

<b>The embed parameter applies a combination of UI adjustments to simplify the embedded meeting interface.</b>
![devto-image12](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ywzslwoe6y8nwanlapb.png)
![devto-image13](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/516qsovg9ljbtt4k66r0.png)
Help! I’ve fallen and can’t get up!
Tags: teamwork, softwaredevelopment, agile
Published: 2021-09-16 12:47:16

---
title: Help! I’ve fallen and can’t get up!
published: true
date: 2021-09-16 12:43:37 UTC
tags: teamwork,softwaredevelopment,agile
canonical_url: https://medium.com/chingu/help-ive-fallen-and-can-t-get-up-c164a6094d55
---

#### Sprint 3 — Thursday

![](https://cdn-images-1.medium.com/max/1024/1*SjgyGw38kJl0Z5xjCR4sPg.jpeg)<figcaption>Photo by <a href="https://unsplash.com/@hansonluu?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Hanson Lu</a> on <a href="https://unsplash.com/s/photos/injury?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption>

### Asking for Help

We all make mistakes and we all encounter problems when developing and testing our projects. There is no shame in this since it’s a fact of every Developers life.

So why is it so hard to ask for help? All too often we tend to view _problems_ as _failures_ when we should be viewing them as _opportunities_ to learn — both for ourselves and those we ask to help us.

> There is no shame in asking for help. The only shame is not asking for help sooner!

Asking for help has many positive outcomes including:

- Faster problem resolution
- More team members gaining familiarity with different parts of the app
- More complete analysis of problem impact across the app
- Identification of the best solution
- Increased learning for you **_and_** the team mate(s) who are helping
- Less likelihood of repeating the same problem

![](https://cdn-images-1.medium.com/max/900/1*G7RvX1WBg1x-4bRuy0jq1Q.jpeg)

### Before you Go!

Chingu helps you to get out of “_Tutorial Purgatory_” by transforming what you’ve learned into experience. The experience to boost your Developer career and help you get jobs.

You can learn more about **Chingu** & how to join us at [https://chingu.io](https://chingu.io/)

* * *
How to add video chat on your website using Arvia Web SDK
Tags: webrtc, javascript, livechat, videochat
Published: 2021-09-16 12:40:48

<b>Where To Use</b>

* You can create your own fully customizable video calling platform.
* You can programmatically use all advanced Arvia features.
* You can handle all of the meeting events and trigger actions accordingly.
* An easy-to-use SDK for developers.

<b>Getting started</b>

In this guide, you will learn how to embed a video meeting on your web page using Arvia Web SDK.

<b>Basic setup</b>

The most straight-forward way to use the Web SDK is to include the required files from our CDN as seen in the code below.

* arvia.chat.js
No other framework or library is required.

<!-- Include arvia.chat.js from Arvia CDN -->
*script type="text/javascript" src="https://arvia.chat/js/arvia.chat.js"  script*

Then in the body section of your HTML, create a div element and set the id=”arvia.chat”

*body
div id="arvia.chat" div
body*

We will use this div element to create Arvia meeting UI. We will do this by initializing the Arvia Chat object

var arviaChat = new ArviaChat();
arviaChat.init("arvia.chat");

We will set the testUser value to true to bypass the domain verification for now. For more information about the verification please visit.

arviaChat.setTestUser(true);

Now, we need to set the room name in the SDK. Since we set the test user true, we will use a test room name in the format of test-room-x

arviaChat.setRoomName("test-room-1");

Now we are ready to connect the server.

arviaChat.connect();

That’s it! Now if we look at the complete code it will be more or less similar to this.

<b>html</b>

head
	script type=“text/javascript”
		src="https://arvia.chat/js/arvia.chat.js" script
head

body
	div id="arvia.chat" div
	script type="text/javascript"
		var arviaChat = new ArviaChat();
		arviaChat.init("arvia.chat");
		arviaChat.setTestUser(true);
		arviaChat.setRoomName("test-room-1");
		arviaChat.connect();
	script
body

<b>html</b>
Cannot open your terminal '/dev/pts/2' - please check
Published: 2021-09-16 12:39:15

fix: https://thedbadmin.com/how-to-fix-cannot-pen-your-terminal-dev-pts-2-please-check/

[thedbadmin@testdb01 ~]$ screen -S screen_test
Cannot open your terminal '/dev/pts/2' - please check.
[thedbadmin@testdb01 ~]$ 


[thedbadmin@testdb01 ~]$ screen -ls
There is a screen on:
	12991.load_data	(Detached)
1 Socket in /var/run/screen/S-thedbadmin.

[thedbadmin@testdb01 ~]$ screen -x 12991.screen_test
Cannot open your terminal '/dev/pts/0' - please check.
[thedbadmin@testdb01 ~]$
I decided to spend time building and promotiong a flash enabled browser!
Tags: flash
Published: 2021-09-16 12:37:28

Because some of my familiy still wants to play flash games
Because I earn my living from creating flash as3 applications (non games)
Because I want it to linger on for another decade on the web

Please start my github!
https://github.com/radubirsan/FlashBrowser
Scopes and Hoisting in JavaScript
Tags: javascript, oop, webdev
Published: 2021-09-16 12:26:44

*The scope manages the accessibility of variables.*

The Scope decides how far the JavaScript will go to look 🧐 for a variable. In the event that it's doesn't exist in the current extension, 🤪 it'll look 👀 in the external Scope .

Scope in JavaScript is the area where we have 😒 Correct ✅ access to a variable / function.

# kinds of scopes in JavaScript —

## 𝐁𝐥𝐨𝐜𝐤 𝐒𝐜𝐨𝐩𝐞{...} :- 💯
Block scoped variables are only accessible inside a block brackets. Which can be, inside an if block({....}), function-block, loop(for,while...), or an seperately defined block. Anything in between by curly braces is a block.

A code block in JavaScript defines a scope for variable declare using let / const as-
```if (true) {
  // "if" block scope
  const message = 'Aayu';
  console.log(message); // 'Aayu'
}
console.log(message); // throws ReferenceError```

**Standalone code blocks**. The standalone code blocks also creates a scope:
```{
  // block scope
  Let message = 'Aayush';
  console.log(message); // 'Aayush'
}
console.log(message); // throws ReferenceError```

Note: **var is not block scoped**


## 𝐅𝐮𝐧𝐜𝐭𝐢𝐨𝐧 𝐬𝐜𝐨𝐩𝐞 𝐟(){.....}, 💥
Variables Scoped inside a function are only available inside a function.

```function walk() {
  // "Walk" function scope
  var message = 'Walk, fast, walk!';
  console.log(message); // 'Walk, fast, walk!'
}
Walk();
console.log(message); // throws Reference Error```

## 𝐆𝐥𝐨𝐛𝐚𝐥 𝐬𝐜𝐨𝐩𝐞 |......| :-
The Variables / functions Which have global scope can be accessed everywhere in the Code-Block or module file.

A variable announced inside the worldwide extension is named worldwide variable. Worldwide factors are available from any extension. 

## Lexical scope
*A lexical scope Contains outer scopes declared constantly.*
Let’s define 2 functions, having the function inner() is nested inside outer().

```function outer() {
  // the outer scope
  let outerVar = 'I am from outside!';
  function inner() {
    // the inner scope
    console.log(outerVar); // 'I am from outside!'
  }
  return inner;
}
const inner = outer();
inner();```




-------------------------------------------------
Hopefully, my post has helped you understand the scope better!
-------------------------------------------------