teleren/devto huggingface dataset:
Save time doing iOS in Xcode using cool automation scripts
Tags: xcode, swift, swiftui, ios
Published: 2020-09-08 08:23:33

According to my ballpark estimates, we as iOS devs spend quite some time clicking through folders finding where we have to open terminal. 

Let's say you work 20 days a month, install cocoapods twice a day, and it takes you 14 seconds to perform the action up until the pressing enter on pods install.

20 * 2 * 14s = 560s

Or about 10 minutes each month, that is roughly __two hours a year__. That is two hours ! Heck, even if it's half of it, you're not wasting your life scrolling through folders.

Therefore I have these two scripts for your enjoyment:

#### 1) Open terminal in current Xcode project

When in Xcode, click a keyboard shortcut and terminal in that folder appears. This is a cool one.

#### 2) Run **pod install** in the current project.

This is even cooler one and it saves you a lot of time when you switch branches (running pod install just to make sure all the pods are there), or switching projects. 

### How to get it

The installation (if you can call it that) is dead simple, copy the files in a folder. Go to Xcode and assign a keyboard shortcut to run each file (very simple). 

The shortcuts are available on my [Github repo](https://github.com/darko55555/XcodeGoodies) alongside step by step tutorial.

If you found value in this, leave a heart on this article down below.

Do you have a suggestion for a cool automation script ? Comment down below, I might make it for you :)
Gold Prices API — How To Get Real Time & Historical Gold & Silver JSON Prices from GoldAPI.io in 30 secs
Tags: webdev, showdev, api
Published: 2020-09-08 08:22:55

---
title: Gold Prices API — How To Get Real Time & Historical Gold & Silver JSON Prices from GoldAPI.io in 30 secs
published: true
description: Gold Prices API — How To Get Real Time & Historical Gold & Silver JSON Prices from GoldAPI.io in 30 secs
tags: #webdev #showdev #api
cover_image: https://miro.medium.com/max/1400/1*US09iCpSEg5SzPqrYki2_A.png
---
A lot of businesses need precise Gold and Silver prices to operate. Unfortunately when it comes to get real time Gold and Silver prices for your automation your options are quite limited. You can even end up by scrapping html pages from Kitco or open trading account on one of the currency exchanges just to get access to gold or silver prices API. But finally there is a solution for developers who needs to get access to Gold and Silver spot and historical prices live feed.

***

Meet [GoldAPI.io — Minimalistic Free Real-Time Gold and Silver Spot Prices REST JSON API](https://www.goldapi.io/).

![Image for post](https://miro.medium.com/max/3524/1*US09iCpSEg5SzPqrYki2_A.png)

GoldAPI.io provides 100% Real-Time & Historical Gold and Silver Spot Prices from FOREX and LBMA for Your Business.

By using GoldAPI.io you get an instant Access To Live Feed of Precious Metals Spot Prices from one simple and free API as well as:

*   100% Real-Time Live Feed from FOREX, SAXO, OANDA and IDC Exchanges
*   Live Metal Spot Prices in USD, AUD, CAD, EUR and other currencies
*   Historical LBMA AM Fix Gold & Silver Prices Since 1968
*   Real-Time Gold/Silver (XAU/XAG) Ratio
*   Free Plan up to 500 requests per month

You can use GoldAPI.io in 30 Seconds. There is No Card Required and No Lock-in Contract for Unlimited plan.

***

To use GoldAPI.io just log in with your Google account to get your free API Key. Once you have your API Key you can test it directly on GoldAPI.io dashboard to get latest Gold and Silver prices in any currency with just one simple GET request:

![Image for post](https://miro.medium.com/max/3436/1*DduiFbhtNMu8kWqK7MDNWA.png)

Even if GoldAPI.io is a relatively new service on the market it has been already trusted by many Fin Tech startups, individual investors and bullion diallers.
Reversed Strings with TypeScript
Tags: typescript, javascript, 100daysofcode, codenewbie
Published: 2020-09-08 08:09:12

{% youtube k2dgkBhurVo %}

To solve this problem, we’ll take 5 different approaches.
Enjoy the video 😀🙏

Also written version https://losseff.xyz/katas/011-reversed-strings/typescript/
Fixing error : Typescript res.json() is not a function
Tags: javascript, react, axios, api
Published: 2020-09-08 08:06:30

## The issue

You have finished the great [NextJS tutorial](https://nextjs.org/learn/basics/create-nextjs-app?utm_source=next-site&utm_medium=nav-cta&utm_campaign=next-website) and you are now ready to use your fresh knowledge into your next web app project. 

You are using `getStaticProps` function to fetch data from your own NodeJS powered API or from an external API like Airbnb, Facebook, Google before pre-rendering the page. 

You have the following code in your **index.js** page for instance : 

```
import {getIndexData} from 'lib/api.js'

export async function getStaticProps() {
  const indexData = await getIndexData()

  return {
    props: {
      indexData
    }
  }
}
```

And the following content in **lib/api.js** : 
```
import axios from 'axios'

const get = endpoint => axios.get(`endpoint`);

export async function getHomeData()
{ 
  const res = await get(`https://api.facebook.com/...`);
  return res.json()
}
```

It should work fine as mentioned on NextJS but instead, you get this annoying error when you open *localhost:3000*

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0p6qq20u1utaufyrmnqg.png)


## The fix

Rewrite your functions the following to start using your data:

In **lib/api.js** : 

```
export async function getHomeData()
{ 
  const {data: response} = await get(`https://api.facebook.com/...`);
  return response
}
```

and in your `getStaticPros` function : 
```
export async function getStaticProps() {
  const data = await getIndexData()
  return {
    props: {
      indexData: data
    }
  }
}
```

Best!
Class ‘App\Http\Controllers\Session’ Not Found In Laravel
Tags: laravel
Published: 2020-09-08 08:01:05

In this tutorial, we learn Class ‘App\Http\Controllers\Session’ not found in Laravel. The session variable is the global variable and use session, you need to session library. In laraval session need some store value and display flash message, etc.

<?php 
namespace App\Http\Controllers;
 
use Illuminate\Http\Request;
 
use Session;
 
class YourController extends Controller
{
    public function index(Request $request)
    {
        //your code
    }
 
}


Read More: https://www.phpcodingstuff.com/blog/class-app-http-controllers-session-not-found-in-laravel.html
So Declare Code War
Tags: webdev, html, javascript, css
Published: 2020-09-08 07:59:25

# So What Is Code Wars ??

## Code Wars is a learning platform where developers improve their skills by coding challenges [Code Wars](http://codewars.com/)

# So What Should I Do Now ??

## Go to the [Code Wars](http://codewars.com/) webpage and sign up and start coding try accepting different challenges 
and post your progress on twitter and github

# So What Are The Benefits ??

## It will siginificantly increase your coding skills 

# Conclusion


# Keep Coding !!!


# 🙏  Share with your friends on  [Twitter](https://twitter.com/intent/tweet?text=%20 So Declare Code War %20%20https://dev.to/alestor123/so-declare-code-war-5b2f"Share It" )
 
 
<h2 align=center> 👇  Find more posts on the following topics </h2>
Redirect To Another Page After 5 Seconds?
Published: 2020-09-08 07:59:18

we will learn redirect in javascript, If you are looking for how to redirect to another page in jquery after 5 seconds then I will give you a simple example to redirect to URL after 2 seconds, 3 seconds, 5 seconds, or any specific time in jquery. we will use setTimeout() for redirect to URL after 5 seconds in jquery.

<script type="text/javascript">
    
    $("button").click(function(){
        $(this).text('Redirecting After 2 Seconds................');
    
        var delay = 2000; 
        var url = 'https://www.phpcodingstuff.com/'
        setTimeout(function(){ window.location = url; }, delay);
    })
    
</script>

Read More: https://www.phpcodingstuff.com/blog/redirect-to-another-page-after-5-seconds.html
So Canvas ???
Tags: webdev, html, javascript, css
Published: 2020-09-08 07:57:35

![Title](https://res.cloudinary.com/practicaldev/image/fetch/s--WO5GEQMC--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://dev-to-uploads.s3.amazonaws.com/i/pxmw933mqpbl23tuw5hp.jpg)

# What is HTML Canvas?
## The HTML`` <canvas>`` element is used to draw graphics, on the fly, via JavaScript.

## The ``<canvas>`` element is only a container for graphics. You must use JavaScript to actually draw the graphics.

## Canvas has several methods for drawing paths, boxes, circles, text, and adding images.

# Canvas Examples

## A canvas is a rectangular area on an HTML page. By default, a canvas has no border and no content.


The markup looks like this:

```<canvas id="myCanvas" width="200" height="100"></canvas>```

## Note: Always specify an id attribute (to be referred to in a script), and a width and height attribute to define the size of the canvas. To add a border, use the style attribute.

## Here is an example of a basic, empty canvas:


# Add a JavaScript
## Draw a Line

```
<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.moveTo(0, 0);
ctx.lineTo(200, 100);
ctx.stroke();
</script>
```
# Conclusion


# Keep Coding !!!


# 🙏  Share with your friends on  [Twitter](https://twitter.com/intent/tweet?text=%20 So Canvas ??? %20%20https://dev.to/alestor123/so-canvas-p4n"Share It" )
 
 
<h2 align=center> 👇  Find more posts on the following topics </h2>
How To Use Summernote WYSIWYG Editor With Laravel?
Tags: laravel
Published: 2020-09-08 07:56:12

In this post, we will learn laravel summernote editor with example. I would like to share how to use summernote editor in laravel. I’m going to share with you how to install summernote in laravel. you will be learn summernote editor in laravel.

we need to use a rich textbox in our laravel application. you can use Summernote WYSIWYG editor, Summernote is wide range use and very popular and you can easily use Summernote without using any library here.



                    <div class="card-body">
                        <form method="post" action="" enctype="multipart/form-data">
                            @csrf
                            <div class="form-group">
                                <label>Name</label>
                                <input type="text" name="name" class="form-control" placeholder="Name"/>
                            </div>  
                            <div class="form-group">
                                <label>Email</label>
                                <input type="email" name="email" class="form-control" placeholder="Email"/>
                            </div> 
                            <div class="form-group">
                                <label><strong>Description :</strong></label>
                                <textarea class="summernote" rows="10" name="description"></textarea>
                            </div>
                            <div class="form-group text-center">
                                <button type="submit" class="btn btn-success btn-sm">Save</button>
                            </div>
                        </form>
                    </div>
                
    <script type="text/javascript">
        $(document).ready(function() {
          $('.summernote').summernote();
        });
    </script>




Read More: https://www.phpcodingstuff.com/blog/how-to-use-summernote-wysiwyg-editor-with-laravel.html
How To Set Session In Laravel?
Tags: laravel, php, javascript
Published: 2020-09-08 07:54:17

n this tutorial, we will learn how to set session in laravel. 

Sessions are used to store user information requests. Laravel provides various drivers like file, cookie, array, and database, etc. to handle session data. By default, the file driver is used because it is lightweight. Session can be configured in the project stored at config/session.php.

Accessing Session Data
we need an instance of session which can be accessed via HTTP request. After getting the instance, we can use the get() method, which will be take one argument, “key”, to get the session data.

$value = $request->session()->get('key');

Storing Session Data
Data can be stored in the session using the put() method. The put() method will be take two arguments, the “key” and the “value”.
$request->session()->put('key', 'value');

app/Http/Controllers/SessionController.php
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class SessionController extends Controller {
   public function accessSessionData(Request $request) {
      if($request->session()->has('my_name'))
         echo $request->session()->get('my_name');
      else
         echo 'No data in the session';
   }
   public function storeSessionData(Request $request) {
      $request->session()->put('my_name','Ajay kumar');
      echo "Data has been added to session";
   }
   public function deleteSessionData(Request $request) {
      $request->session()->forget('my_name');
      echo "Data has been removed from session.";
   }
}
?>

Read More: https://www.phpcodingstuff.com/blog/how-to-set-session-in-laravel.html
Battle Ship Challenge For Developers
Tags: webdev, html, node, game
Published: 2020-09-08 07:54:04

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fiqibjgjb0p6mrxi5wsm.jpeg)

# So What Is This Battle Ship Challenge ????

## A few days ago [CodeStackr](https://www.youtube.com/channel/UCDCHcqyeQgJ-jVSd6VJkbCw),[Ania Kubów](https://www.youtube.com/channel/UC5DNytAJ6_FISueUfzZCVsw),
[Web Dev Simplified](https://www.youtube.com/channel/UCFbNIlppjAuEX4znoulh0Cw)

## Made a youtube collab 

[![Everything Is AWESOME](https://img.youtube.com/vi/U64vIhh0TyM/0.jpg)](https://www.youtube.com/watch?v=U64vIhh0TyM"Everything Is AWESOME")

## In this collab they made a multi player battles ship game
## Try Making this project from scratch it would
## siginificantly improve your js skills  and a golden fether

## for your portfolio as a developer
## To build this project it takes a siginificant amount of 
## time and effort and it's worth time try making it better

# So What Sould I Do Now ???

## Try to build the project from scratch or try imporoving the exsiting project at [Battle Ship Git](https://github.com/kubowania/battleships)

## It includes socket.io for multi player game 

## And Tweet Every Progress If You Can 

# Conclusion 

# Keep Coding !!!


# 🙏  Share with your friends on  [Twitter](https://twitter.com/intent/tweet?text=%20Battle Ship%20%20Challenge For%20Log%20Every%20Developers%20%20https://dev.to/alestor123/battle-ship-challenge-for-developers-14ag "Share It" )
   


 
<h2 align=center> 👇  Find more posts on the following topics </h2>
Where Should I Deploy 
Tags: webdev, html, aws
Published: 2020-09-08 07:51:01

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/idimevz68hzl65lnc38w.jpg)

# So Where Do I Deploy My App ??

## There are serveral platofroms to deploy your app 
## It depends on the complexity and use of your app 

# If you just want to show case your app you can use one among these 👇

# Heroku 

- Heroku is a cloud platform to host your apps simply 
- You only need to know basic git commands 
- It comes with no cost but you can deploy 5 app max
- Widely used by Developers
 
# Netlify 
- You can deploy unlimited deploys
- Widely used by Developers

# Github Pages 
- You can deploy unlimited apps
- Can use github actions for automations

# When It comes to Scalability

# AWS 
- You can deploy unlimited Apps for an developer or an enterprise plan
- Recommended By Developers
- Even Dev.to is deployed on AWS
# Azure 
- You can deploy unlimited Apps for an developer or an enterprise plan

# And More .. 

# Conclusion

## Every Service has its own pros and cons 

# Keep Coding !!!

# 🙏  Share with your friends on  [Twitter](https://twitter.com/intent/tweet?text=%20 So Where Do I Deploy?%20%20https://dev.to/alestor123/so-where-do-i-deploy-eah "Share It" )
 

 
<h2 align=center> 👇  Find more posts on the following topics </h2>
So What The Heck Is Taiwind??
Tags: css, webdev, html
Published: 2020-09-08 07:49:35

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/mi9f2242znbslevjt3l0.png)
# So What The Is Taiwind ??

## Taiwind highly customizable, low-level CSS framework that gives you all of the building blocks you need to build bespoke designs without any annoying opinionated styles you have to fight to override.

# So Should I Use It ??

## It depends on your application you want to develop.TaiWind is a good companion when it comes to styling and time.

# So How Do You Get Started ??

## Please Refer To The Docs For More Info [Docs](https://tailwindcss.com/docs/installation)

# Is It Better Than Boostrap ??

## Each Framework Has Its Own Pros and Cons
## When it comes to popularity Boostrap is well ahead of taiwind

# Should I Use It In Every App ??

## The short answer is no !!! Try coding everything from scratch it will defenitly improve your css skills

# Conclusion

## Refer To This Tutorial If You Want Learn Taiwind

[![Everything Is AWESOME](https://img.youtube.com/vi/NRagrTU_v8o/0.jpg)](https://www.youtube.com/watch?v=NRagrTU_v8o"Everything Is AWESOME")



# Keep Coding !!!



# 🙏  Share with your friends on  [Twitter](https://twitter.com/intent/tweet?text=%20So What The Heck Is Taiwind??%20%20https://dev.to/alestor123/so-what-the-heck-is-taiwind-2e31 "Share It" )
   

 
<h2 align=center> 👇  Find more posts on the following topics </h2>
Quick tip about array and unique values
Tags: javascript, array, set, quicktips
Published: 2020-09-08 07:18:31

The naive way to do this is to check each value, add it to a data structure, and detect if we haven't added it before.

### The naive way
```javascript
const namesFromAnotherGalaxy= ['Luke', 'Leia', 'Obi-Wan', 'Luke', 'Obi-Wan'];

function naiveWay(names) {
  const unique = {};
  names.forEach((i) => {
    if(!unique[i]) {
      unique[i] = true;
    }
  });
  return Object.keys(unique );
}

naiveWay(namesFromAnotherGalaxy); // ['Luke', 'Leia', 'Obi-Wan']
```
Another simple way of thinking to get unique values from an array is to use the filter method to filter out the repetitive values. 

### The filter way
```javascript
const duelists = ['Yugi', 'Kaiba', 'Yugi', 'Joey', 'Joey'];

const filterWay = (names) => names.filter((value, index) => names.indexOf(value) === index)

filterWay(duelists); // ['Yugi', 'Kaiba', 'Joey'];
```
But with the new native Set object we can do something smoother and easier.

### This is the way
```javascript
const thisIsTheWay= [...new Set(['kobe', 'kobe', 'michael', 23, 24, 23])]; // ['kobe', 'michael', 23, 24]
```

That's it, make good use of it !

---

I'm not a native English speaker so, thanks in advance if you want to improve my article with correct syntax/grammar/sentences.

I can accept all kind remarks :)

Cover by [Faris Mohammed](https://unsplash.com/@pkmfaris) on [Unsplash](https://unsplash.com/photos/PQinRWK1TgU)
How to Use Excel VAR Function in Office 365? – [with Examples]
Tags: excelfunctions, excelvarfunction
Published: 2020-09-08 10:38:34

---
title: How to Use Excel VAR Function in Office 365? – [with Examples]
published: true
date: 2020-09-08 07:06:36 UTC
tags: ExcelFunctions,ExcelVARFunction
canonical_url: https://geekexcel.com/how-to-use-excel-var-function-in-office-365-with-examples/
---

## Excel VAR Function:

In this article, you will learn the usage of **Excel VAR Function in Office 365** with its syntax, description, and examples. Let’s step into this article!! Get an official version of **MS Excel** from the following link: [https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)
## **VAR Function – Description:**

- This function is used to find the variance of the given data.
- It can be manually calculated by using the below-given formula.

![VAR Formula](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/09/VAR-Formula.png)<figcaption id="caption-attachment-13548">VAR Formula</figcaption>

## **Syntax:**

**=VAR(number1, [number2],..)**

### Parameters Description:

**Number1 ** – It is the first input number or cell reference.

**Number2 ** – It is an optional one. It can be a number or cell reference.

### Note:

- The arguments can be **Numbers** , **Names** , **Arrays** , or **References**.
- This function **ignores Empty cells, Boolean values, and Text, any Non-numerical values**.

## **Examples:**

Let’s see some examples to make it clear.

### Example 1:

- Refer to the below example image.
- You can see the input range from the **cell B2** to **B10, ** and its variance value is printed in the **cell E3**.

![Example](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/09/Example-2.png)<figcaption id="caption-attachment-13549">Example 1</figcaption>

The following mathematical calculation explains the working of VAR Function in Excel.

![Calculation of Variance](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/09/mspaint_bAiSGgLW1o.png)<figcaption id="caption-attachment-13555">Calculation of Variance</figcaption>

### Example 2:

- This function ignores **Empty cells** , **Boolean values** , and **Text** , any **Non-numerical values**.

![Example 2](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/09/Example-2-1.png)<figcaption id="caption-attachment-13550">Example 2</figcaption>

## **Bottom-Line:**

In this article, you can clearly learn the usage of **Excel VAR Function in Office 365** with its syntax, description, and examples. Kindly, share your **feedback** in the comment section. Thanks for visiting **[Geek Excel.](https://geekexcel.com/)** Keep Learning!!
accounting textbook solution guides online
Published: 2020-09-08 07:02:34

Textbook guides are essential aids for any college course or discipline. All manners of learning from exam preparation or projects and assignments to self-study becomes easier with a collection of well-prepared textbook solutions. ScholarOn offers the best <a href="https://scholaron.com/textbook-solutions/management-manuals"> accounting textbook solution guides online </a> like <a href="https://scholaron.com/textbook-solutions/solutions-for-crafting--executing-strategy-the-quest-20th-edition-9780077720599"> Solutions For Crafting  Executing Strategy The Quest 20th Edition </a>.
Staticrypt :
Password protect a static HTML page
Tags: html, beginners, css, javascript
Published: 2020-09-08 06:43:13

StatiCrypt generates a static, password protected page that can be decrypted in-browser: just send or upload the generated page to a place serving static content (github pages, for example) and you're done: the javascript will prompt users for password, decrypt the page and load your HTML.

It basically encrypts your page and puts everything with a user-friendly way to use a password in the new file.

AES-256 is state of the art but brute-force/dictionary attacks would be trivial to do at a really fast pace: use a long, unusual passphrase.

You can get repo here:

{% github robinmoisson/staticrypt %}

######***IMP REQUEST:***

###### You are most welcome to join my team 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/3qhbvg5fsrh3nt7anh36.png)

[ Click here for joining my team ]
(https://forms.gle/pSCALuEWHus3pg9F6).

###### *Also you are most welcome to join OPEN SOURCE INTELLIGENT SYSTEM (OSINT) if you can help in open source project regarding safeguarding humans from various diseases like CORONA outbreak*
######https://github.com/Manishfoodtechs/OSINTHRH/wiki

Contact email: Manishfoodtechs@gmail.com. 

If you have any problem, our team is also engaged in professional consultancy and delivery.

![](https://media2.giphy.com/media/oNrPzIy3OhHm7zrvA3/source.gif)

Imagecredit: pixabay