teleren/devto huggingface dataset:
Android viewBinding (Jim Wilson Course)
Tags: android, mobile, kotlin
Published: 2021-08-25 06:49:54

#ViewBinding

Hi All this is my first blog post. I am going to cover viewbinding for beginner coder who is using Jim Wilson course on PluralSight.

The first time you build your project using the basic layout on Android Studio 3.6 and above you will find this layout of your project. Please delete the code lines and the files marked in red.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5iy8lger2cofehzygxpk.png)

You need to delete this code also in your content_main.xml because you design view will not render your view because of the fragment xml code that it is referencing
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ztma38dp3d4z4tip7f6.png)

Your start project should look like this without the fragments and the source code that controls the fragments in mainActivity.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6jmwbutefsm40uglbzfl.png)

You are now ready to implement Jim Wilson code the only difference is how you will reference your views in your layout. If you you look in your res.layout folder you will see two files activity_main.xml and content_main.xml. In your activity_main.xml you will see an include state for content_main.xml you need to give it an id (marked in red).
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/growcklnev23q7sruhak.png)

you need to give it an id, if you type id in the code block android studio will give you an autocomplete tab
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oyxcsegwbdwiaqzhrdnj.png)
 

##Now we can talk about viewBinding
ViewBinding is Android Studio way of referencing your views in your layout without using findViewById. It has the following advantages over findViewById: 
1. Type safety
2. Null safety
3. Compile time error report this means that you will see your errors during compile time instead of runtime

 
ViewBing is implemented by the followig code in your MainActivity.kt file
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wyrkyvo3dukqj4egat9o.png)

You use the binding variable to reference your views in layout eg Jim Wilson implements his code using koltin default referencing system that you can use with an empty activity. The basic activity that implemnets viewBinging and seems to discard the default kotlin reference system. This just means that you will not be able to reference your views in you layout like Jim Wilson. 
```
val originalValue = textDisplayValue.text.toSting().toInt()

val newValue = orginalValue * 2

textDisplayedValue.text = newValue.toString()
```
You will need to implement the code above by using the viewBinding variable >binding

```
val originalValue = binding.layout_content_main.textDisplayValue.text.toString().toInt()

val newValue = orginalValue * 2

binding.layout_content_main.textDisplayValue.text = newValue.toString()
```

And this is the basics of using viewBinding to reference you views.
Setting up your Orbi wifi router
Tags: orbirouter, orbilogin, orbilogincom, netgearorbilogin
Published: 2021-08-25 06:34:36

There is no benefit in keeping your newly purchased Orbi Netgear. This post is made to highlight to you how you can quickly complete a <a href="https://www.orbilogiin.com/">netgear orbi login</a>. As it contains only a few steps, you will not have to spend the whole day setting up your Orbi wifi router. 
<a href="https://www.orbilogiin.com/">Orbilogin.com</a>
<a href="https://www.orbilogiin.com/routerlogin-net/">Routerlogin.net Setup</a>
How to update package.json dependencies
Tags: npm, webdev, beginners, devops
Published: 2021-08-25 06:03:46

If you've ever installed npm packages and you got same version (not upgrade packages). So not worry just three lines of code will help to update.

This [npm-check-updates](https://www.npmjs.com/package/npm-check-updates) is a utility that automatically adjusts a package.json with the latest version of all dependencies.

```
$ npm i -g npm-check-updates
$ ncu -u
$ npm install
```

`1. $ npm i -g npm-check-updates` 
![Update NPM Dependencies](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ivcnjlj8e1nv6qylmjd2.png)

`2. $ ncu -u` 
![Update NPM Dependencies](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6kd6hol3f135twg5c2cb.png)

`3. $ npm install` 
![Update NPM Dependencies](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zoaym2mrd3vupd1860ou.png)

**Thank you for reading.**
Method to login the Asus Router
Tags: asusrouterlogin, asusroutersetup, routerasuslogin
Published: 2021-08-25 05:59:39

Before you begin your <a href="https://www.asuslogin.com/asus-router-setup/">Asus router setup</a>, it is necessary for you to <a href="https://www.asuslogin.com/">login to asus router</a>. Subsequently, you will be able to carry out your setup with these professional tips. Setting up your new Asus wifi router may seem like a hard thing to do but it is very easy.
How to DOUBLE Your Productivity
Tags: motivation, productivity
Published: 2021-08-25 04:20:14

this is how you can double your productivity and get twice as much done within your 24 hours use productivity apps to read a non-fiction book it takes about eight hours to read but realistically in each book there's usually only three or four main key points use book summary apps such as shortfall which will give you the key points in just 15 minutes when commuting commuting is one of the longest periods of time where you're not actually doing anything productive turn this dead time into productive time by listening to audiobooks or your university lectures isolate yourself turn off everything your phone your emails all notifications tell everyone that you're intensely busy for the next few hours and focus on just one single task without interruptions set your goals the night before at night write down three or four things that you need to do the next day don't write everything you need to do with this system as soon as you wake up in the morning you'll know exactly what you need to do.
Free Logos from any Logo maker in JPG/PNG/SVG/Vector etc...
Tags: css, beginners
Published: 2021-08-25 05:42:56

Hi there, fellow community members. 

In this thread we are discussing about how you can get any logo of your choice from any logo maker website for free.

Well many of you might already know of this. But this is my version of it. I hope you will like it.

To make it easier to understand lets break it into small steps:-

Step 1: Create the logo of your choice(obviously).

Step 2: Remember to follow a light and dark color scheme. No gradients, no shades and the like.

Step 3: Use snipping tool(any tool of your choice) to snip out the logo. This ensures there is no quality loss.

Step 4: Now open the captured logo into Adobe illustrator. Select the logo and go to "Object>Image Trace>Make and expand".

Step 5: Boom!! You acquired a cutout of your logo. Now Right click the selection and select "export as" and choose your desired format. To achieve a vector then select SVG and export.

Step 6: You can now easily import the SVG into any application like Figma(what I used) and edit it in any way you like.

Step 7: (Alternate) You can achieve the similar result using Photo shop just make sure the logo is in single color scheme. Then use "Magic wand" to select the desired part of the logo. Parts with same color will be selected.

Step 8: Now "Cut" (ctrl+X) the selection and paste it on a new transparent background (ctrl+N, choose transparent in the option).

Step 9: Now export it in any format of your choice .


So, That was all, hope it worked for you. If so then plz show your support.

Fell free to comment any changes or similar tricks to help the readers.

Thank You!!
How I started with a Technical Blog
Tags: beginners, writing, webdev
Published: 2021-08-25 05:35:06

Hello,Dev Friends.I could have named the title as how one can start writing a technical blog but the approach might be different for different people hence,I will be sharing few points based on my experience on a high level.Here, I am not talking about how to plan your each blog post.

The moment I saw people sharing their blog posts on Twitter,my first reaction was "I don't know if I can ever write one."
Writing poems,travel blog has been my passion since childhood but I never tried writing about some technical concepts and the projects I have built.

Here are some points which I would like to share:

1.Choose a platform first where you would like to write your blog posts.I chose Dev community.

2.Choose a domain and stick to it.For example, web development,mobile development,etc in whichever field you feel comfortable.

3.Never write with the intention of writing a blog post:Just for the sake of writing do not start with a blog post.Write with an intention of sharing information and helping others.

4.It is not mandatory to be an expert in a particular field before you start writing a blog.

5.Ideas will come only when you are consistent in coding and deeply involved in the field.When your mind thinks about it even in a default mode,ideas will flow naturally.You will never have to think separately about the topics.

6.Talk about your projects and the concepts which you found interesting or worthwhile to share with others while you are on your journey. 

7.Talk about your journey,career switch,podcasts,talks,tutorials anything which you have done or doing in this field.

8.Avoid repetition and making your blog monotonous.But it is obvious that we are not experts and so we learn through mistakes.

9.Read blogs of others in the coding community and get an idea.

Keeping the post short I would just like to say that START.PLEASE START.Do not think twice.

Happy Coding :)
You can follow me on [Twitter](https://twitter.com/kritikasri27) and [Github](https://github.com/kritika27).
iPhone 11 Pro Max Realistic Mockup Free
Published: 2021-08-25 04:33:34

iPhone 11 Pro Max Realistic Mockup is here! The mockups are high resolutions, very easy to customize and comes with multiple variations. Download and enjoy now.
With the high quality renders, you will never lose the quality of your presentation. It’s easy to place your design and customize the original mockups. Use these high quality mockups to create the perfect presentation for your design.

The mockup scene generator includes the iPhone, a smartphone with fully customizable colors, shadows, and smart objects. You can use it for social media posts like Instagram, to spice up your portfolio on your website, or Behance and Dribbble projects. Also usable for print purposes due to its high resolution.

Download here: https://templateduo.com/iphone-11-pro-max-realistic-mockup-free
Fitness Zone Mobile App UI Kit Free
Published: 2021-08-25 04:32:07

Fitness Zone Mobile App UI Kit is an all-in-one mobile app that provides different types of workout activities in a single app to help you stay fit and active. The workout activities include swimming, walking, running, gym, cycling, and yoga.

Download here: https://uitemplate.net/fitness-zone-mobile-app-ui-kit-free
Glue pyspark ETL job load batch data to on-prem Kafka
Published: 2021-08-25 04:22:54

We are trying to load batch data to Kafka in our on-prem data center using AWS pyspark Glue ETL job but are unable to make a connection.

We are trying to write the spark dataframe to on-prem Kafka producer using pyspark etl glue job. 
The problem is that the code needs the keystore & trustore files (.jks files ) as options, but we are not sure how to access the files as options (basically how to add the file to some work directory for glue job that glue run time engine can refer them directly). 
Please guide for this use case.

Below is code snippet:

df.selectExpr("to_json(struct(*)) AS value") \\
  .write \\
  .format("kafka") \\
  .option("kafka.bootstrap.servers", "hal-kfkaint-d01.com:9093,hal-kfkaint-d02.com:9093") \\
  .option("kafka.security.protocol", "SSL") \\
  .option("kafka.ssl.truststore.location", "s3://xxxxxxxx/keystore/server.truststore.test-dev.jks") \\
  .option("kafka.ssl.keystore.location", "s3://xxxxxxxx/keystore/server.keystore.test-dev.jks") \\
  .option("kafka.ssl.keystore.password", 'xxxxxxxxxx') \\
  .option("kafka.ssl.truststore.password", 'xxxxxxxxx') \\
  .option("topic", "xxx-xx-to-xx-topic") \\
  .save()
situato al centro della pista da ballo
Published: 2021-08-25 04:20:44


Gli ospiti sono entrati nella reception attraverso un ingresso drappeggiato di chiffon e sono stati accolti da un grande lampadario in cristallo e oro da 3 Stage Lighting, situato al centro della pista da ballo Abiti da sposa a sirena, I tavoli degli ospiti circondavano la funzione di illuminazione personalizzata, che il fioraio ha disegnato un emozionante arrangiamento di pampa che viene dall'alto. Tutto in questa stanza era eccitante!
http://www.gillne.it/abiti-da-sposa-c12
​

Abbiamo portato il vecchio mondo, la classica atmosfera da sala da ballo al tavolo da pranzo degli ospiti, ma gli ha dato un tocco moderno. Le sedie dorate avevano un'incisione vintage e davano un tocco di colore al blush e al design bianco del matrimonio, La Tavola ha fornito lenzuola in velluto rosa cipria lucido e asciugamani damascati bianchi. La delicata vetreria bordata di oro e i rigogliosi fiori bassi con un accenno di pampa spuntano dai centrotavola e conferiscono una tale dolcezza allo spazio. Bilanciamo questa eleganza con posate moderne in bianco e oro, pesca e porcellana bianca di Theoni. Ogni dettaglio è stato tenuto a mente per l'amore di Dana per l'erba di pampa e per i desideri di Michael per una relazione elegante e confortevole.
Loving right now: This Figma template for creating Database ERDs
Tags: database, figma
Published: 2021-08-25 23:54:18

---
title: Loving right now: This Figma template for creating Database ERDs
published: true
date: 2021-08-25 04:20:23 UTC
tags: databases, figma
canonical_url: https://rachsmith.com/loving-right-now-this-figma-template/
---

As part of some work I'm doing for CodePen, I needed to come up with an ERD document for an extension we're making to our database. I think the last time I had to make an ERD was 15 years ago, as part of a Software Engineering degree.

I figured in 2021 there would be some cool, nice looking software that would make it quick and easy for me to put an ERD together. I was wrong. All the flowchart making software I tried was clunky and did not feel good to use. Maybe my experience with Web & UX Design Software over the years have set my expectations too high. I found myself wondering, why can't there just be a Figma but for Software documentation?

So I Googled "create erd figma" and [a link to this free template](https://arctype.com/blog/erd-builder/) came up. This was exactly what I was looking for. With the pre-built components I was able to make a nice-looking ERD in a reasonably short amount of time. And I know anyone else on the team will be able to update it as we are already in the habit of using Figma files at CodePen. I'd show you the final result but it is for a project that we are keeping under-wraps for now.

I just wanted to share my love for this template. Thanks to [Arctype](https://arctype.com/) for the free resource!

[Check out the Figma template here.](https://arctype.com/blog/erd-builder/)
How To Show Custom Post Types in Category Archive Page
Tags: wordpress, php
Published: 2021-08-25 04:11:38

By default WordPress custom post types do not appear in a category or tag archive page, to change this behaviour and display the custom post type you can add this filter/function to your themes functions.php file.
```
function examcraze_show_cpt_archives( $query ) {
 if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
 $query->set( 'post_type', array(
 'post', 'nav_menu_item', 'custom-post-type-name-here'
 ));
 return $query;
 }
}
add_filter( 'pre_get_posts', 'examcraze_show_cpt_archives' );
```

Just add your custom post type name to suit, or to add more than one just comma separate the names.
Iniciando com o jest
Tags: node, javascript, testing, typescript
Published: 2021-08-24 20:51:16

Neste posts nos vamos ver como iniciar os teus estudos com Jest, vamos ver o que é, e como pode ajudar no seu desenvolvimento de aplicações.
<img height="48"src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y5clicw559gztoxmzowp.png">

<p>⠀⠀⠀⠀⠀⠀⠀⠀</p>

### Para que server o Jest?

O Jest foi inicialmente criado para testar o framework React(front-end),criado pelo Facebook. Porém sua implementação se tornou muito mais ampla, sendo utilizado como ferramenta de teste unitário para diversas plataformas JavaScript como Node(back-end) e Redux, e até mesmo plataformas em TypeScript como Angular e Ionic.

<p>⠀⠀⠀⠀⠀⠀⠀⠀</p>


### Quais problemas resolve


O jest pode ser muito útil ao decorer do desenvolvimento de uma aplicação, por váriados motivos, mais alguns é que você tem muito mais controle e segunrança do que aconteçe na sua aplicação.

<p>⠀⠀⠀⠀⠀⠀⠀⠀</p>

### Como começar a estudar sobre o Jest

Agora que você já sabe para que server e como pode te ajudar eu vou te passar algumas indicações , para começar a estudar está ferramenta incrivél.

- [Documentação oficial](https://jestjs.io/pt-BR/)
- [Vídeo introturio de Jest Rocketseat](https://www.youtube.com/watch?v=18Dgf7lb9QA)


<p>⠀⠀⠀⠀⠀⠀⠀⠀</p>

Agora que você já tem por onde seguir com os seus estudos, peço que me segui nas outras redes socias minhas, por lá posso muito conteúdo de qualidade.
- [Instagram](https://instagram.com/onicolasteofilo)
- [Linkedin](https://linkedin/in/nicolasteofilo)
KodeCamp.HNG.Internship
Tags: kodecamp, hng, uiux, intership
Published: 2021-08-25 03:51:41

I am ecstatic to join KODECAMP/HNG INTERNSHIP 2021. Over the course of a few months, I have been studying and doing research on UI/UX design but haven’t had the chance to learn in a community with an ample amount of experienced mentors and colleagues like KodeCamp.
KODECAMP is a community of learning that teaches different aspects of tech (Known as Stacks in @Kodecamp) for anyone interested. Absolutely anyone, which is the amazing part.
In this 16 weeks of training, I have some specific goals to achieve:
I hope to learn the fundamentals, principles and elements of UI/UX design and how to efficiently implement them to create clean and usable user interface across all platforms.
With this knowledge, I hope to usability problems and meet accessibily needs of all categories of users.
I hope to gain real world experience, business culture and how to collaborate with a team.
More than anything, I hope to connect with mentors and fellow designers to grow with through my career.
I am eternally grateful to the organizers of @Kode_Camp for giving me and many others a chance to learn, grow and meet.

#kodecamp
How To Get Current User Location In Laravel
Tags: laravel, location, php, codenewbie
Published: 2021-08-25 03:38:07

In this tutorial we will show you how to get current user location in laravel using stevebauman/location, Some times we have required to find current user location  for many purpose. Also show you how to track user IP address and you can find user location information from IP address.

So, here I am using stevebauman/location laravel package, Using this package you can get many information of utilizer like IP address, Country Name, Country Code, Postal Code, Zip Code, Region Denomination, State Name, Country Denomination, Longitude, Latitude, ISO Code, etc.

So, let's start and follow below step one by one

> Step 1 : Install Laravel

> Step 2 : Install stevebauman/location Package In Your Application

> Step 3 : Add Service Provider And Aliase

> Step 4 : Create Controller

> Step 5 : Add Route

> Step 6 : Create Blade File 

So, finally we are done with our code we can get below output.

![How To Get Current User Location In Laravel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2jcg6fa8bloxvp8ovtqi.png)

---

> **_[Read More : How To Get Current User Location In Laravel](https://techsolutionstuff.com/post/how-to-get-current-user-location-in-laravel)_**

---

> **_[Read More : How To Generate Barcode In Laravel](https://techsolutionstuff.com/post/how-to-generate-barcode-in-laravel)_**
Python Day-1
Tags: linux, python
Published: 2021-08-24 17:54:27

1.Python Interpreter

![Python Interpreter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2n75exxoxvcr7yk4kkeq.png)
Python can launched by typing python3 in the prompt of you linux terminal .

' >>> ' this is python prompt,waiting for the input.
Python interpreter can be used as a calculator,simple arithematic calculations can be using the operators +,-,*,/,(()) .

Variables can also be used in the python interpreter and values are assigned to it.
In the example shown width and height are variables and values are assigned to it , their value is calculated and stored in 'area', later using the print() function the value of area is printed.

![Python interpreter Calculator Examples](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7vcxlua1gxvrjgidjkbp.png)

Python supports integer, floating, decimal, fraction and also python has builtin functions for complex number it used 'j' to indicate the imaginary part 3+5j

![Complex Numbers in python interpreter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bf4c5ryjos0frp767bv8.png)

-> To open a file in interpreter mode 
python3 -i filename.py

2.Strings
 -> Single Quotes: Identifier representation.
 -> Double Quotes: String representation.
 -> Triple Quotes: Multiline Texts
The below table represents how python uses indices

+---+---+---+---+---+---+
 | P | y | t | h | o | n |
 +---+---+---+---+---+---+
 0   1   2   3   4   5   6 

   -6  -5  -4  -3  -2  -1
 ![Python Strings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dzeu8hq5bh1du1ksn8no.png)
Deploying React with Express with route integrity
Tags: react, tutorial, typescript, beginners
Published: 2021-08-25 03:36:34

## Background

As you may or may not know React often uses routing through the browser [history API](https://developer.mozilla.org/en-US/docs/Web/API/History) 

A few of the common libraries that you might encounter would  be:

- React Router DOM: https://www.npmjs.com/package/react-router-dom
- Wouter: https://www.npmjs.com/package/wouter (personal favorite)

These libraries will let you define routes and which components are being rendered.

Quick Example:

```ts
<Route path="/about"><AboutPage/></Route>
<Route path="/user/:id">
    {params => <UserPage id={params.id} />}
</Route>
```

Running this in dev mode will work fine.

![awesome](https://c.tenor.com/kwv_MuCidz8AAAAM/yes-will-ferrell.gif)

---

## Issue

If you build the react app and try to host it with express you'll notice we run in an issue:

```ts
import * as express from 'express'
const app = express()
app.use(express.static(configuration.buildDirectory));
app.listen(8080, () => {
    console.log(`Server started on port 8080`);
});
```

If you navigate to [http://127.0.0.1:8080](http://127.0.0.1:8080) you'll see your react app.

However if you navigate to [http://127.0.0.1:8080/about](http://127.0.0.1:8080/about)

You will receive an error:

```
Can't GET /about
```

![not working](https://c.tenor.com/4Ch9kTLVFJUAAAAC/well-this-brain-is-not-working-squidward.gif)

---

## Solving the Issue

Our issue comes from the fact that express will only allow the route '/' to be used.

The idea is that we want to preserve the routes but still display our built `index.html`

For this we can add the following statement:

```ts
app.all('*', (req, res) => {
    res.sendFile(path.join(configuration.buildDirectory, '/index.html'), (err) => {
        if (err) {
            res.status(500).send(err)
        }
    })
});
```

This means that for every route we will render the `index.html` however since we are not redirecting we will preserve the URL scheme.

![mission accomplished](https://c.tenor.com/ul_Bdn13nnQAAAAC/missionaccomplished-emperorsnewgroove.gif)

---

**Pixium Digital** - Shaping your project with technology and innovation
https://pixiumdigital.com
https://github.com/pixiumdigital