teleren/devto huggingface dataset:
5 iPhone Apps You Should Have
Tags: ios, iphone, apps, devops
Published: 2022-10-02 12:09:25

These days, it seems like there’s an app for everything. And while that may be true, not all apps are created equal. Some are definitely better than others. So, if you’re looking for a few apps to download to your iPhone, here are five that you should consider.

##What apps should I have on my iPhone?
1. **[Facebook](https://appsupports.co/284882215/facebook)**: Whether you love it or hate it, there’s no denying that Facebook is one of the most popular social networking platforms around. With more than 2 billion active users, there’s a good chance that at least some of the people you know are on Facebook. The Facebook app makes it easy to stay connected with your friends and family no matter where you are.
2. **[Instagram](https://appsupports.co/389801252/instagram)**: If you’re into photography or just enjoy looking at pretty pictures, then you’ll definitely want to download the Instagram app. With more than 800 million active users, Instagram is one of the most popular photo sharing platforms around. And whether you’re interested in checking out photos from professional photographers or just your friends and family, there’s sure to be something for everyone on Instagram.
3. **[Snapchat](https://appsupports.co/447188370/snapchat)**: Snapchat is another popular social networking app that allows users to share photos and videos with their friends. But what sets Snapchat apart from other similar apps is the fact that all photos and videos shared on the platform expire after 24 hours. This makes Snapchat perfect for sharing quick snaps with your friends without having to worry about them being saved forever.
4. **[WhatsApp](https://appsupports.co/310633997/whatsapp-messenger)**: WhatsApp is a messaging app that allows users to send text messages, make voice and video calls, and even share files with other WhatsApp users. The app is extremely popular worldwide, especially in countries where traditional texting plans are expensive or difficult to come by.
5. **[Spotify](https://appsupports.co/324684580/spotify-music-and-podcasts)**: Spotify is a music streaming app that gives users access to millions of songs from artists all over the world. Whether you’re into pop, rock, hip-hop, or any other genre of music, chances are you’ll be able to find it on Spotify. Plus, with Spotify Premium, you can listen to your favorite tunes without any ads interrupting your listening experience.

There are literally millions of apps available for download on the iPhone App Store. And while that may be overwhelming, it also means that there’s an app out there for just about everything imaginable. So whatever it is you’re looking for in an app, chances are you’ll be able to find it—and these five apps are a great place to start your search!

Source: [https://appsupports.co/blog/5-iphone-apps-you-should-have](https://appsupports.co/blog/5-iphone-apps-you-should-have)
Conditional statement in JavaScript.
Tags: javascript, beginners, programming, conditions
Published: 2022-10-02 11:40:44

**1.Introduction**
Conditions are very important topic in programming.
They are extensively used in programming as they determines a True and False condition in the code. They are of three types:

- if condition
- else if condition
- else condition 

**NOTE**
if, else if, else are the keywords and are not same as If, Else if, Else.

**2.if condition**
if condition determines the True condition.
**Syntax**

```
if (condition) {
 //the code block to be executed if condition is True
}
```
**2.1-Examples of if condition**

Example 1:
```
const var1=10;
if (var1==10){
console.log("Its right")
```
**OUTPUT**
"Its right".
In the above example we have declared a variable and assigned a value to it, then we checked its value through if condition.

Example 2:
```
if (10/2 == 5){
  console.log("Its correct")
}
```
**OUTPUT**
"Its correct".
**3.else if condition**
else if condition is preceded by an if condition, and it is checked when the first if condition is not True.
**3.1 Syntax**

```
else if(condition){
//the block of code to be executed if the first if condition is  False 
}
```
**3.2-Examples of else if condition**
Example 1:

```
const var1=50;
if (var1>100){
console.log("Its greater than 100")
}else if(var1>40){
console.log("Its greater than 40")
}else{
console.log("Input Invalid")
}
```
**OUTPUT**
Its greater than 40 .
In above example, firstly if condition was checked by the machine which was False ,then machine checked else if condition which got True. 
**4.else condition**
It is the block of code which is executed when the specified condition is False.

**4.1-Syntax**

```
else {
//code block to be executed when if condition id not True
}
```
**4.2-Examples of else condition**
Example 1:
```
const num1=10;
const num2=20;
if (num1>num2){
console.log("num1 is greater than num2")
}else{
console.log("num2 is greater than num1")
}
```
Example 2:
```
const var1=10;
if (var1 % 2 !== 0){
  console.log("Its a Even Number")
}else{
  console.log('Its a Odd Number')
}
```
Here are some JavaScript repos for you to contribute at Hacktoberfest you might not know yet
Tags: javascript, hacktoberfes, contributorswanted
Published: 2022-10-02 11:08:01

It's Hacktoberfest! ⌨️
Looking to contribute to open source at #Hacktoberfest2022? Mainly #JavaScript? 🤔
Here are some projects you might not know yet that could be a good entry point:

## Meteor

[Meteor](https://meteor.com) is an ultra-simple environment for building modern web applications.
It provides a full stack and integrates with many of your favourite frontend technologies.

{% github https://github.com/meteor/meteor %}


## CLAIRE

CLAIRE is a classroom management, enriched with reflexive processes. 
It is designed to emphasize on methods and interactions with a high reflexive outcome in students and teachers.


{% github https://github.com/classroom-interaction-environment/claire %}

## lea.online

Our mission is to bring elementary literacy development to the digital space to allow ubiquitous and anonymous learning and diagnostics of someone's literacy.

{% embed https://github.com/leaonline %}

## easy-speech

Cross browser Speech Synthesis; no dependencies. This project was created, because it's always a struggle to get the synthesis part of Web Speech API running on most major browsers.

{% github https://github.com/jankapunkt/easy-speech %}

## node-oauth/oauth2-server

Complete, compliant and well tested module for implementing an OAuth2 server in Node.js.
Maintained fork of OauthJS with ongoing development and improvements.

{% github https://github.com/node-oauth/node-oauth2-server %}

## latexcv

A collection of simple and easy to use, yet powerful LaTeX templates for CVs and resumes.

{% github https://github.com/jankapunkt/latexcv %}

## npm package template

Minimal, optinionated, tested and fully functional NPM package template project for ES6+ Javascript.

{% github https://github.com/jankapunkt/npm-package-template %}

## detect-os

Detect current running OS including version and arch, if possible. No dependencies. All code < 300 lines.

{% github https://github.com/jankapunkt/js-detect-os %}

## js-class-privacy

Uses proxies to implement private members when the native equivalent is not available.

{% github https://github.com/jankapunkt/js-class-privacy %}

## Notes on these repos

All repositories are either maintained by myself or I am more or less involved in their development process and I can support you when working on a PR (reference me via jankapunkt on GitHub). And now, happy coding! 🤩

Follow me on Twitter or my other socials for updates, to stay in touch or contact me:

GitHub: https://github.com/jankapunkt/
Twitter: https://twitter.com/Kuester_Jan/
LinkedIn: https://linkedin.com/in/jan-kuester/
Support my work: https://paypal.me/kuesterjan
Dictionary Web App
Tags: dictionary, javascript, webdev, api
Published: 2022-10-02 10:51:25

Hi everyone,
I'm writing my first programming related article on dev.to and it's about the Dictionary Web App I have been build.

### Check Out Here:
[Dictionary App](virtualwiz1.github.io/js-projects/dictionaryapp)

![Dictionary demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6t4880ki9d8yoxzwkv5u.png)

Its a fairly simple App with not much code. I have used [Dictionary Api](dictionaryapi.dev) to handle fetch request for words that has been searched.

---
### Features:
- Can listen to Pronunciation and Phonetics
- Can identify PartOfSpeech
- Simple UI
- Minimalistic design
- Fast Response
- Uses API to fetch data

---

### Resources I have used:

- HTML
- CSS
- JavaScript
- [Dictionary API](dictionaryapi.dev)

---

Feedbacks Appreciated!
Is Symmetric Tree
Tags: javascript, leetcode
Published: 2022-10-02 10:46:08

```js
/**
 * Definition for a binary tree node.
 * function TreeNode(val, left, right) {
 *     this.val = (val===undefined ? 0 : val)
 *     this.left = (left===undefined ? null : left)
 *     this.right = (right===undefined ? null : right)
 * }
 */
/**
 * @param {TreeNode} root
 * @return {boolean}
 */
var isSymmetric = function(root) {
    if(root===null) return true;
    return isSym(root.left, root.right)
};

function isSym(left, right) {
    if(left === null || right === null) return left === right
    if(left.val !== right.val) return false
    return isSym(left.left, right.right) && isSym(right.left, left.right)
}

```
Permutation of a string
Tags: javascript, leetcode
Published: 2022-10-02 10:45:14

Given two strings s1 and s2, return true if s2 contains a permutation of s1, or false otherwise.

In other words, return true if one of s1's permutations is the substring of s2.

 

Example 1:

Input: s1 = "ab", s2 = "eidbaooo"
Output: true
Explanation: s2 contains one permutation of s1 ("ba").

```js
var checkInclusion = function (s1, s2) {
  if (s1.length > s2.length) {
    return false;
  }

  const freqMap = {};
  let count = 0;
  let start = 0;
  let end = 0;

  for (let char of s1) {
    if (freqMap[char] === undefined) count++;
    freqMap[char] = (freqMap[char] || 0) + 1;
  }

  while (s2.length > end) {
    let nextChar = s2[end];

    if (freqMap[nextChar] !== undefined) {
      freqMap[nextChar]--;
      if (freqMap[nextChar] === 0) {
        count--;
      }
    }

    end++;
    if (count === 0) {
      return true;
    }

    if (end - start === s1.length) {
      let temp = s2[start];
      if (freqMap[temp] !== undefined) {
        freqMap[temp] += 1;
        if (freqMap[temp] === 1) count++;
      }
      start++;
    }
  }
  return false;
};


console.log(checkInclusion("dc", "odicf"));

```
Web simulation of Kali Linux
Tags: kalilinux, react, javascript, webdev
Published: 2022-10-02 10:18:49

This is a personal portfolio website of theme Kali Linux, made using React.js & tailwind CSS. If you want to edit this. Clone this project and edit the files in /src/components.
Link : [](https://ali-abo-alshamlat.github.io)
Source Code : (https://github.com/Ali-Abo-Alshamlat/ali-abo-alshamlat.github.io))
To run this on localhost type npm start and when u are done coding type npm run build to build your app.
NOTE: if you have yarn just replace npm start and npm run build with yarn start and yarn build.
To make the contact form work
Create a account in emailjs create also new Outlook or Gmail account to be able to send email.
Create a new service, select and log in to your newly created outlook or gmail account on EmailJS.
Go back to the dashboard and get the Service ID copy it.
Create a .env file in your root folder and put

NEXT_PUBLIC_USER_ID = 'YOUR_USER_ID'
NEXT_PUBLIC_TEMPLATE_ID = 'template_884mtzv'
NEXT_PUBLIC_SERVICE_ID = 'YOUR_SERVICE_ID'
into it. Replace *your user id and your service ID with your values in your EmailJS service.
This project was made using Create React App! Here is the scripts that u can run.
npm start
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
npm run build
Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributiors who wants to make this website better can make contribution,which will be greatly appreciated.

1. Fork the Project
2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
3. Commit your Changes (git commit -m 'Added some AmazingFeature')
4. Push to the Branch (git push origin feature/AmazingFeature)
5. Open a Pull Request

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

[](https://www.linkedin.com/posts/ali-abo-alshamlat_portfolio-kalilinux-reactjs-activity-6969636167889629184-yQfu?utm_source=share&utm_medium=member_desktop)
How JS works?
Tags: javascript, beginners, webdev
Published: 2022-10-02 10:03:02

Everything in JS happens inside an Execution Context.

**Execution Context:**
 Component where JS is executed. It has:
1.**Memory or Variable Env**
Here variables are stored as `key: value `pair.
2.**Code Env or Thread of execution**
This is the place where code is executed one line at a time.
**Note: JavaScript is a synchronous single-thread language.**

   **1nd Phase: Memory creation phase**
- Everything happens in a ‘Global’ execution context.
- In this phase, memory is allocated to all variables and
function(s).
- For variable(s), key is the variable name itself and value is undefined (even if the variable is initialized). And, for
function(s), key is the function name and value is body of the
code.
         **2nd Phase: Code Execution phase**
          

- Code is traversed line by line and actual value of variables are assigned to them.

- A new ‘local’ execution context is created, when function
‘invocation’ is encountered. Again, two phase perform their role.
SBOM/Vulnerability Assessments against Docker Images.
Tags: security, docker, devops, devjournal
Published: 2022-10-02 10:01:21


Hello, I believe every Developer needs to use Cli Tools Like Anchore/Grype and Anchore/Syft before pushing an Docker Image to any Docker Registry.

Grype Ref: https://lnkd.in/d4NB3uv3
Syft Ref: https://lnkd.in/drK3jZmx

Youtube References, see them in action to understand why you need to use them.
Grype Ref: https://lnkd.in/dfvJAxvX
Syft Ref: https://lnkd.in/dPEgw9i3

Screenshot from Grype Vulnerability Report.

![Image Grype Report](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k2xw9f4hgxxvkf3panej.PNG)

I hope you like the tutorial, if you do give a thumps up! and follow me in [Twitter](https://twitter.com/TVelmachos), also you can subscribe to my [Newsletter ](https://dashboard.mailerlite.com/forms/167581/67759331736553243/share) in order to avoid missing any of the upcoming tutorials.


#### Media Attribution
I would like to thank [Clark Tibbs](https://unsplash.com/@clarktibbs) for designing the awesome [photo ](https://unsplash.com/photos/oqStl2L5oxI)I am using in my posts.

Thank you, Cheers!!!
What I learned after failing a technical interview at Microsoft
Published: 2022-10-02 09:54:51

It was June 2022 when I managed to get a phone interview with a recruiter at Microsoft. I was being interviewed for the Software Development Engineer II role. Even though I managed to come up with optimal solutions for the given problems, I later realized that the whole interview process was a failure. I’m sharing this because I don’t want you to do the same mistake I did. 

**Behavioral Interview Process**
We did the interview through Microsoft Teams which were 3 rounds, 1 behavioral and 2 coding rounds. The behavioral interview went well from my point of view. The recruiter asked questions like my past work experience, other technical related questions and walked through my resume. 

**Coding Interview Process**
This process wasn’t difficult I had to solve 2 LeetCode medium problems which are: “Kth Largest Element in an Array” and “Longest substring with no repeating characters”. When I saw these questions, I was very happy because I had seen them before onAlgoExpert, thanks to Clement Mihailescu. I quickly worked out the solutions, wrote the code and everything went good including space and time complexity. 

**Mistakes that I made**
This is the most important part of the post, if you made through it congrats – let’s get into it

  - **I didn’t ask clarification question to the interviewer**
       As soon as I got the first question,I quickly solved it without asking any clarifications. Always seek clarification about the question upon hearing it.You might discover that you have missed something else. It also lets the interviewer know that you are attentive to details. Consider asking questions how big is the size of input,what kind of values are there (negative numbers, floating points).


  - **I didn’t make suggestions for alternatives**
        As soon as I got the problem, I quickly went with the optimal solution. If you want to go above and beyond the bare requirements, you should propose various solutions to your problem. You should also compare your options and choose the best one based on your limits. 

These are the mistakes that I made during the interview, I focused more on the coding part other than communicating with the interviewer.

**Other interview mistakes to avoid**
-	Working through problems in your head
-	Not testing your solution
-	Coding without planning

For more interview tips, you can visit Clement Mihailescu’s  YouTube channel
Add friend button - A step-by-step guide
Tags: css, webdev, beginners, tutorial
Published: 2022-10-02 09:35:06

![Add Friend button](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qzrkr2gtmsv2aa4t95uz.png)

## <u>HTML</u>

For HTML, we'll need a div element with two spans inside. One with "+" text and one with "Add Friend" text.

Now we'll set classes, "button" to div element, "plus" to span element with "+" text and "text" class to span element that has "Add Friend" text.

```html
<div class="button">
    <span class="plus">+</span>
    <span class="text">Add Friend</span>
</div>
```
      

## <u>CSS</u>

For CSS, first, we'll style div element with class "button".

We'll set some basic styling, background, border, color...

We'll set width and height to 50 pixels which form a circle with 25 pixels of border radius.

Using flexbox, we'll align elements in center.

Now we'll add a little transition, hide everything that overflows and set cursor to pointer.

```css
.button {
    background-color: rgb(78, 180, 203);
    width: 50px;
    height: 50px;
    border-radius: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: .3s;
    overflow: hidden;
    cursor: pointer;
    color: #fff;
}
```
      
As for out span elements, we'll set position to absolute and add a little transition.

```css
.plus, .text {
    position: absolute;
    transition: .3s;
}
```
      
On div hover, we'll set it's width to 100px and transition to 300 ms.

```css
.button:hover {
    width: 100px;
    transition: .3s;
}
```
      
On div hover, we'll hide the span element with "+" text, by setting opacity to zero.

We'll also set transition, so that it disappears smoothly.

```css
.button:hover .plus {
    opacity: 0;
    transition: .3s;
}
```
      
To element that has "Add Friend" text, we'll set opacity to zero. This element will appear on div hover (when plus sign disappears).

```css
.text {
    opacity: 0;
}
```
      
On div hover, we'll set opacity to one, on span with "text" class.

With a little transition, this will appear smoothly.

```css
.button:hover .text {
    opacity: 1;
    transition: .3s;
}
```
      
And that is it.

You can find full code and video tutorial [here](https://designyff.com/code/add_friend_button).

Thanks for reading. ❤️
1155. Number of Dice Rolls With Target Sum
Tags: cpp, algorithms
Published: 2022-10-02 09:32:00

# Description

You have `n` dice and each die has `k` faces numbered from `1` to `k`.

Given three integers `n`, `k`, and `target`, return *the number of possible ways (out of the* `kn` *total ways) to roll the dice so the sum of the face-up numbers equals* `target`. Since the answer may be too large, return it **modulo** `109 + 7`.

## Example 1:

```
Input: n = 1, k = 6, target = 3
Output: 1
Explanation: You throw one die with 6 faces.
There is only one way to get a sum of 3.
```

## Example 2:

```
Input: n = 2, k = 6, target = 7
Output: 6
Explanation: You throw two dice, each with 6 faces.
There are 6 ways to get a sum of 7: 1+6, 2+5, 3+4, 4+3, 5+2, 6+1.
```

## Example 3:

```
Input: n = 30, k = 30, target = 500
Output: 222616187
Explanation: The answer must be returned modulo 109 + 7.
```

## Constraints:

- `1 <= n, k <= 30`
- `1 <= target <= 1000`

---

# Solutions


```cpp
class Solution {
public:
    int numRollsToTarget(int n, int k, int target) {
        const int MOD = 1e9 + 7;
        vector<int> f(target + 1, 0);
        f[0] = 1;
        for (int i = 1; i <= n; i++) {// 枚举所有物品
            for (int j = target; j >= 0; j--) { // 枚举体积, 从大到小 
                f[j] = 0;
                for (int u = 1; u <= k & u <= j; u++) {
                    f[j] = (f[j] + f[j - u]) % MOD;
                }
            }
        }
        return f[target];
    }
};
```
Build better structured databases with Golang Gorm
Tags: go, database, programming, postgres
Published: 2022-10-02 09:27:35

**GORM** is a great **ORM library for Go developers**. with _incredible feature_ lists and _speed_, it is considered the <u>standard GO ORM</u>.


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

Apart from being an excellent ORM for Go developers, its <u>built to be developer-friendly</u> and <u>easy to comprehend</u>. Gorm is _built on top of the database/sql packages_.

overview and features of the ORM are:

- Developer Friendly
- Every feature comes with a tests
- Hooks / Callbacks (Before/After Create/Save/Update/Delete/Find)
- Eager loading with Preload, Joins
Context, Prepared Statement Mode, DryRun Mode
SQL Builder, Upsert, Locking, Optimizer/Index/Comment Hints, Named Argument, SubQuery
- Transactions, Nested Transactions, Save Point, Rollback To to Saved Point
- Associations (Has One, Has Many, Belongs To, Many To Many, Polymorphism)
- SQL Builder
- Logger

Continue reading on [Medium Post](https://medium.com/@itskenzylimon/getting-started-on-golang-gorm-af49381caf3f)

Want to keep in touch online? [Medium](https://medium.com/@itskenzylimon) | [Twitter](https://twitter.com/ItsKenzyLimon) | [Instagram](https://www.instagram.com/itskenzylimon/) | [Behance](https://www.behance.net/itskenzylimon)