teleren/devto huggingface dataset:
Meet new people like you (idea)
Tags: startup, idea, people, networking
Published: 2020-08-29 16:14:25

---
title: Meet new people like you (idea)
published: true
description: I made a website where you can register, enter your interests and then talk people like you.
tags: startup, idea, people, networking
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/uvt9crqdvmnol4kxq3j6.png
---

**Idea**

I want to solve two of my problems:

1- I want to meet new people outside my personal circle who has some common interest.

2- English is not my main language, I would like to talk with some native speaker.

**Solution**

I develop a very simple website [https://chaturne.com/](https://chaturne.com/) where you can create a anonymous profile (your name and email are not public), just answer some questions to know more about you:
- what languages do you speak?
- what languages do you want to speak?
- what are you looking for?
- a litle description of yourself.

Everytime you visit the homepage you will see random people who has some common interest, at this moment there are only two people (me and a friend), so I just ask for a little patience, register today and maybe in one or two days you can meet new people.

To talk someone just click the button "send message" and you will be able to send a voice message of 2 minutes long, the messages will delete after 24 hours.

If you liked to talk someone and you want to keep as contact, there is a button "add as a contact".

**Example of my profile**

![my profile](https://dev-to-uploads.s3.amazonaws.com/i/8pqjim49bhc8p77o0r14.png)

**Final message**

I hope you like the idea and find it useful.
#006 DS&A - Stacks and queues
Tags: datastructures, algorithms
Published: 2020-08-29 16:09:24

# Introduction

Nothing to say more than hello 👋,
In Case your wondering who is this man in the banner it's the Khwarizmi the inventor of algorithms concept.
Make sure to follow because I will start more advanced series in future.
## Stacks and queues
### Implementation of Stack using arrays

the problem of arrays that we should know the max number of elements we need to use, If you can't predict the size go with linkedlist.

A stack mean that we can only get last element and first input is last output.

```c
int stack[max];
int top = -1; // mean stack is empty
void push(int item) 
{
    if (top == max-1) printf("overflow");
    else stack[++top] = item; // ++top will increment top first
    return;
}

int pop()
{
    int temp
    if(top == -1) 
    {
        printf("underflow");
        return -1;
    }
    else temp = stack[top--];
    return temp;
}
```

### Linked List implementation of stack

![image-20200829171708212](https://i.loli.net/2020/08/29/eJRWAKZ7HM3bsBN.png)

he head will link to the new node.

```c
struct node
{
    int i;
    struct node *link;
};

void push(int item)
{
    struct node *p = (struct node*)malloc(sizeof(struct node));
    if(p == NULL)
    {
        printf("error of malloc");
        return;
    }
    p->data = item;
    p->link = head;
    head = p;
}
```

pushing time is `O(1)`

```c
int pop()
{
    int item;
    struct node *p;
    if(head == NULL)
    {
        printf("underflow");
        return -1;
    }
    item = head->i;
    p = head;
    head = head->next;
    free(p);
    return item;
}
```

pop is `O(1)`

### Queue using circular array

even if a circular array we visualize it as an circular array.

front and rear will both be pointing to the 0 element. let's say we have an array of 4 integers

first type I need to put an element the rear will move `+1` when the rear is already reach n-1 again I need to put it at n-1 so I will use (rear+1) mod n , dashed rear it mean it pass from here it start from `0` to `n-1`

![image-20200829174026353](https://i.loli.net/2020/08/29/gqE32LIFz75Moxk.png)

```c
// delete element
int dequeue()
{
    if(front==rear)
    {
        printf("Q is empty");
        return -1;
    }
    else
    {
        front = (front+1) mod n;
        item = q[front];
        return item;
    }
}

// insert element
void enqueue(item)
{
    rear = (rear+1) mod n;
    if(front == rear)
    {
        printf("Q is full");
        if(rear == 0 ) rear = n-1;
        else rear = rear-1;
        return;
    }
    else
    {
        q[rear] = item;
        return;
    }
}
```

Queue will be full if 

`(rear+1) mod n == front`

Queue will be empty if

`rear == front`
Global Error Handling In Webflux (Reactive World)
Tags: programming, reactive, springboot, webflux
Published: 2020-08-29 16:06:08

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

https://medium.com/@ghahremani/global-error-handling-in-webflux-reactive-world-2001427913
Why .then run first before the actual promise
Tags: javascript, promise
Published: 2020-08-29 15:44:38

async function test(){
    await setTimeout(() => {
        console.log('run first');
    }, 1000)
}
test().then(console.log('finished'));

Output
//finished
//run first.

Why is the callback being executed before the actual promise?
I know setTimeout causes a delay in the callstack but that is why promises/asyncs are being created, to wait until a script finish execution before moving to the then callback.

What am I not getting right about promises or my code.

Mind you: I know async await shouldn't be used in code like the example above but just using it to illustrate same issue I had with my actually code in node
How Cypress might be the easiest way to setup E2E tests for your web app
Tags: testing, webdev
Published: 2020-08-29 15:43:36

Yesterday, I discovered Cypress ([repo](https://github.com/cypress-io/cypress)), an all-in-one testing platform for frontend applications. It is an amazing tool that is both easy to use and effective.

# How to setup cypress in your project
First, install the npm package
```
npm install --save-dev cypress
# Or
yarn add --dev cypress
```

Then, open it with
```
node_modules/.bin/cypress open
```

You be greeted with a window where you can run the example tests that show the features of cypress:
![](https://user-images.githubusercontent.com/1271364/31740846-7bf607f0-b420-11e7-855f-41c996040d31.gif)

Then, you can start wrinting tests.

# How to write tests
A simple login test can be written in 9 lines as:
```javascript
describe('Log in', () => {
  it('should log in and redirect to home page', () => {
    cy.visit('http://localhost:3001/');
    cy.get('[data-testid=EmailInput]').type('user@email.com');
    cy.get('[data-testid=PasswordInput]').type('123');
    cy.get('[data-testid=SignInButton]').click();
    cy.url().should('match', /home$/);
  });
});
```

- `describe` simple groups tests under a title, in this case 'Log in'
- `it` defines a new test with a title, in this case 'should log in and redirect to home page'
- `cy.visit` makes the cypress browser access our server login page
- `cy.get` gets an HTML element on the page
- `cy.get(...).type` types text on an element
- `cy.get(...).click` clicks on the element (surprising, I know)
- `cy.url()` allows to make assertions on the current url.

So basically, we access the login page, types an user email and password, clicks on the log in button, and checks to see we were redirected to the home page.

# Finishing up
You could do the setup and have a working log in test in less than 15 minutes. That's the simplicity of cypress, and why you should at least consider using it to test your wep apps.

Don't forget to read the best practices [page](https://docs.cypress.io/guides/references/best-practices.html) on their documentation, and watch the best practices [talk video](https://www.youtube.com/watch?v=5XQOK0v_YRE) to learn more about the tool.

PS: If you're using Typescript, like me, this [guide](https://docs.cypress.io/guides/tooling/typescript-support.html#Install-TypeScript) might save you a little bit of time to get TS to work with cypress.
Top-5 handy lerna flags for your monorepo
Tags: lerna, javascript, project, monorepo
Published: 2020-08-29 15:36:15

## --scope <package_name | name_pattern>

This filter limits the command execution scope only to packages that meet the condition. For example:

```
// starts a package with the name 'server'
lerna run --scope server start

// starts all packages end up on '-server'
lerna run --scope *-server start 

// you can select multiple scopes at the same time
// executes either '-server's and '-client's 'start' command
lerna run --scope *-server --scope *-client start
```

## --ignore <package_name | name_pattern>

This one works as the previous, but in the opposite way. Basically, it excludes everything that matches the pattern or name.

```
// Runs 'npm audit' everywhere, but in ui-library
lerna exec --ignore ui-library npm audit

// Runs 'npm audit' everywhere, but in dev-server and dev-client packages
lerna exec --ignore dev-{server,client} npm audit
```
## --stream/--parallel

[Find more about my personal monorepo experience on my blog](https://ntscx.com/posts/top-5-handy-lerna-flags-for-your-monorepo)
User Experience (UX) Part 2- Processes in the UX
Tags: ux, technicalwriting, technicalwriter
Published: 2020-08-29 13:14:32

After discussing the basics of [User Experience](https://dev.to/adhistac/user-experience-ux-19mg) now I will  put light on the processes in the UX. 

Let's get started;

1.**Company Research**: Initially, before designing UX for a company, the UX designer must be acknowledged with the company's brand, culture, industry-related news, and competitors.

2.**User Research**: After company research, the UX designer should focus on gathering user-related information. This step is critical for project success. There are several methods such as; creating a focus group, conducting surveys, card sorting methods,  prototyping, interviewing, and so on. Conducting user research will help remove assumptions from the design process. Furthermore, users, in turn, appreciate and be able to use the system benefitting the goodwill of an organization.

3.**Information Architecture**: After gathering useful information, all the content should be inventoried. Then, content auditing is performed where we analyze *What is good or working well?* and *What is missing?* Based on the findings, a new architecture is drafted and tested with users. Finally, the above steps are iterated. Information Architecture helps with findability and understandability from a user and system point of view.

4.**Wireframing and Visual Design**: Now is the time to get things down on a digital paper. There are two types of wireframing; *low-fidelity wireframe* and *high-fidelity wireframe*. *Low-fidelity wireframe* is quick, easy, and cheap as it allows you to get idea out of your head, just like doodling. *High-fidelity wireframe* is more detailed, realistic, and is almost near to an actual visual design. Several tools such as; Axure, Sketch, Figma, and so on are used for wireframing.

On the other hand, *Visual Design* is the aesthetics of a site. It includes elements such as; lines, shapes, color, texture, and typography. To achieve an effective visual design, alignment, contrast, proximity between elements, layout, whitespace, and consistency should be kept into consideration.

5.**Usability Testing**: Finally, usability testing is a task-based approach in an actual system. Satisfaction is measured based on whether a user can complete the task successfully. Rating Scale (1-10) or baseline is marked, and changes are identified to improve those numbers. While conducting usability testing, test plans are created, the environment is set up, users are identified, tests are conducted, and results are summarized. However, in some exceptional cases, *heuristic testing* is performed, which is an educated guess. 

In the upcoming blog, we will be dive deeper into *Ten Usability Heuristics*.

Happy writing :)
How to create a white label iOS app (Part 3)
Tags: ios, swift, xcode
Published: 2020-08-29 15:23:44

---
title: How to create a white label iOS app (Part 3)
published: true
date: 2020-08-29 15:17:43 UTC
tags: ios,swift,xcode
canonical_url: https://www.rockandnull.com/how-to-create-a-white-label-ios-app-part-3/
---

As we discussed on [Part2](https://dev.to/mavris/how-to-create-a-white-label-ios-app-part-2-240), it's not recommended to create  duplicates of the same class with different target membership.

You can download the project [here](https://github.com/Rock-and-Null/iOS---WhiteLabel/releases/tag/Part2) as we left it on Part2.

We could tackle this issue using **Preprocessor flags,** which will allow us to add conditions based on which target the app is running. Go ahead and delete the Coffee class under RealCoffee. Then go to Coffee class under the TestCoffee folder and check the RealCoffee target under **Target Membership.**

![How to create a white label iOS app (Part 3)](https://www.rockandnull.com/content/images/2020/08/Screenshot-2020-08-28-at-8.36.47-PM.png)<figcaption>Coffee class is now recognised by both targets</figcaption>

Now we need to set an identifier for each Target. Will set this identifier under Build Settings -> Active Compilation Condition for both identifiers. Use TESTCOFFEE and REALCOFFEE for both Debug and Release.

![How to create a white label iOS app (Part 3)](https://www.rockandnull.com/content/images/2020/08/Screenshot-2020-08-28-at-8.43.32-PM.png)

<iframe width="100%" height="386" scrolling="no" border="no" allowtransparency="true" frameborder="0" style="border:none!important;width:100%!important;height:386px;position:relative;" src="https://upscri.be/ltv52r?as_embed=true"></iframe>

Now head to the Coffee class and modify the coffeeDescription as follows:

```
static func coffeeDescription() -> String {
     #if TESTCOFFEE
        return "TestCoffee"
     #elseif REALCOFFEE
        return "RealCoffee"
     #else
        return "WRONG"
     #endif
}
```

It's clear from the code that the response from the coffeeDescription function will depend on the target. If the response is "WRONG" then something went wrong setting the **Active Compilation Conditions.**

I personally don't like using Preprocessor flags for the coffeeDescription function because it won't scale. Imagine having 30 targets and having 30 Preprocessor flags for each one. I just wanted you to know that you have that option! Use with caution.

Happy coding!

[How to create a white label iOS app (Part 1)](https://www.rockandnull.com/how-to-create-a-white-label-ios-app/)
[How to create a white label iOS app (Part 2)](https://www.rockandnull.com/how-to-create-a-white-label-ios-app-part-2/)
[How to create a white label iOS app (Part 3)](https://www.rockandnull.com/how-to-create-a-white-label-ios-app-part-3/)
[How to create a white label iOS app (Part 4)](https://www.rockandnull.com/how-to-create-a-white-label-ios-app-part-4/)
[How to create a white label iOS app (Part 5)](https://www.rockandnull.com/how-to-create-a-white-label-ios-app-part-5/)
High School DXD Season 5
Tags: highschooldxd5, animes, dxd
Published: 2020-08-29 14:57:47

As we all know that Animes have becomes everyone’s favorite. There is another anime that is based on Japanese manga series and the name of that anime is “High School DXD”. The story is about some school students who are killed by women on their first date. This season has a huge fan base and now we all are waiting for the fifth season to arrive. Yes, Yes, Yes, the angels and the devils are back again with the new season! “High School DXD Season 5”.  If you want to know about the new anime High School DXD Season 5, then you have come to the right place. Here, we will discuss the Release Date, Cast. So, without wasting any time let’s have a look at the following information given below.

<h1>Release date of High School DXD Season 5<h1>

The anime indeed has to lead to become popular with its audience, but there is no official announcement regarding the launch of the fifth season. But don’t worry, if the COVID Pandemic recovers then the audience can expect the upcoming season to come out by December 2020 or 2021.
If we get any extra update about the release of High School DXD Season 5, then we will update you soon regarding the same. Until then stay tuned with us and don’t have to be disheartened.   

<h2>Characters of High School DXD Season 5 </h2>

<ul><li>Azumi Asakura who plays the role of Rias Gremory</li>
<li>Akeno Himejima who plays the role of Shizuka</li>
<li>Koneko Toujou who plays the role of Ayana Taketatsu</li>
<li>Yuuto Kiba who plays the role of Kenji Nojima</li></ul>

Well, we are anticipating the launch of High School DXD Season 5 soon, till then you can complete all the seasons of this anime and be entertained. And, also We assure you that we will keep this article updated as new information emerges. 
For more updates regarding your favorite animes or series, stay tuned with us. Check out our exclusive articles.
Span<T>
Tags: textprocessing, dotnet, csharp
Published: 2020-08-29 14:51:52

When Microsoft introduced [`Memory<T>`](https://docs.microsoft.com/en-us/dotnet/api/system.memory-1) and [`Span<T>`](https://docs.microsoft.com/en-us/dotnet/api/system.span-1) there was some confusion about what the types were even for. Because of the tremendous opportunities they provide, I'd like to explain what role they serve, especially with regards to [**Stringier**](https://github.com/Stringier).

In both cases, [`Memory<T>`](https://docs.microsoft.com/en-us/dotnet/api/system.memory-1) and [`Span<T>`](https://docs.microsoft.com/en-us/dotnet/api/system.span-1), they are what's called reference slices. That is, they are references to existing objects in memory, and are also slices of that object rather than a reference to the whole thing. Confusing? Yeah, a bit. Generic concepts aren't all that great to explain. But you can think of it like this: in both cases, these are arrays, only they reuse an existing array.

Now, more specifically, these are used for two scenarios. First and foremost, they are an optimization tool. Because you're not allocating on every slice, you can wind up using way less memory, which means time spent allocating objects on the heap, less time the garbage collector spends doing work, and more. But there's another purpose I don't think Microsoft mentioned anywhere near well enough: they provide a generalization of contiguous data in ways that required duplication of code before. What do I mean by this? Well, thinking of [`Span<T>`](https://docs.microsoft.com/en-us/dotnet/api/system.span-1) as a reference to part of an array is only part of the picture. It's a reference to ***any*** _contiguous_ memory. What's this mean? Well, heap arrays, stackalloc arrays, fixed buffers, even fat pointers; they can all be referenced through the common type: [`Span<T>`](https://docs.microsoft.com/en-us/dotnet/api/system.span-1).

This means, for all practical purposes, `ReadOnlySpan<Char>` is a `String`. But even better, a "string" that can reuse portions of existing strings! And use of it allows for much more comprehensive API surface, by allowing more of what is conceptually the same, to be used as the same thing, through one single method.

Now, this isn't entirely perfect. I've got a lot of complaints about the way generics are handled in many programming languages, and as you've probably noticed, some of the problems [`Span<T>`](https://docs.microsoft.com/en-us/dotnet/api/system.span-1) solves are clearly workarounds with the flawed C# generics system. But hey, it still means way less duplication of code, and a way better API surface.

Simply put, [`Memory<T>`](https://docs.microsoft.com/en-us/dotnet/api/system.memory-1) and [`Span<T>`](https://docs.microsoft.com/en-us/dotnet/api/system.span-1) are abstractions and generalizations, but uniquely allow for more efficient code.
A New Path to Learning About Cloud
Tags: azure, beginners, github, 100daysofcloud
Published: 2020-08-29 14:43:07

Learning a new technology can be difficult. Having the right tools makes all the difference between an enjoyable experience and a difficult one. A new Web site, 100DaysOfCloud, is providing huge benefits to my Azure learning journey. 
 
There are a few podcasts that are my goto places to learn about Azure and cloud technologies. One podcast I listen to frequently is Mike Pfeiffer's [CloudSkills.fm](https://podcasts.apple.com/us/podcast/cloudskills-fm/id1448194100) podcast. It is an excellent source for learning about cloud technology, especially from a DevOps perspective, but also from a broader view of the cloud.

In a recent [episode](https://podcasts.apple.com/us/podcast/087-learning-azure-with-gwyneth-pena/id1448194100?i=1000488710653), Mike talked with Gwyneth Pena, an Azure MVP, about starting down the path to learning Azure. During that interview, Gwyneth discussed the [100DaysOfCloud](https://www.100daysofcloud.com/) Web site. The Web site is self-described as a "cloud community challenge" - a place where newbies like me can get hands-on experience while learning about cloud technologies. Full disclosure - I have no affiliation with the 100DaysOfCloud Web site nor the CloudSkills.fm podcast other than that of a participant and listener.

The Web site is in its early stage of development. For instance, there is a notification stating the registration functionality hasn't been coded yet. However, there is more than enough information and materials there to get you started. Read thru the *FAQ* and *Rules* sections to get an understanding of how everything works. Be sure to check out their *getting started* videos. Those explain how to set up your GitHub repository and the exercises you'll need to complete each day. Also, there are some articles posted on AWS and Azure in a wide range of topics.

Beyond the skills you'll learn, the site is fostering a community of people who are supporting those who are learning, and teaching, Azure. I'm excited about this aspect of the site. It is encouraging to think that in addition to learning a new skill, I may be able to help others along their learning path as well.

Be sure to add both the CloudSkills.fm podcast and 100DaysOfCloud Web site to your learning toolbox. Each of these resources provides helpful, valuable information that will make your learning path more productive and enjoyable.