teleren/devto huggingface dataset:
My goals)
Published: 2020-06-17 19:52:36

---
title: My goals)
published: true
description: 
tags: discuss 
//cover_image: https://direct_url_to_image.jpg
---
I'm have been working at restaurants a long time. I was waiter. I have enjoyed about working with guestes. I'm relly appreciate that time but when the COVID-19 came cross me. I decided that I want to be Front-end developer. 
I'm so happy that I'm going to became Front-end developer!!!


Smile , you should to be happy!!!
Hbase 'No protocol version header error'
Published: 2020-06-17 20:49:25

---
title: Hbase 'No protocol version header error'
published: true
date: 2020-06-17 19:51:09 UTC
tags: 
canonical_url: https://inzamam.dev/hbase-No-protocol-version-header-error
---

Hi there,

Earlier today, I faced a problem: I had a task that needed python [happybase](https://happybase.readthedocs.io/en/latest/index.html) to do the operation on Hbase.

![Error mesage screenshot: "No protocol version header error"](https://inzamam.dev/media/no_protocol_ver_header.png)

I received: “No protocol version header error”

Finally, I resolved this problem after digging up Cloudera docs.

First of all, I have to declare this before going further: the Hbase thrift server was opened before the above issue happened.

I searched for this HBase config setting in CM:

`hbase.regionserver.thrift.http`

It was checked. In /etc/hbase/conf/hbase-sit.xml, It’s value was ’_true’_

I found a link: [_https://github.com/wbolster/happybase/issues/161_](https://github.com/wbolster/happybase/issues/161)

![](https://inzamam.dev/media/thrift_hbase__ss.png)

So, I unchecked it. ( In hbase-sit.xml, it becomes ‘false’ )

Then restarted Hbase service, and problem got solved

I saw a lot of people had this issue, so sharing here in the hope it would be helpful.
Refresh page using Metatags
Tags: html, webdev, frontend
Published: 2020-06-17 19:50:54

Ok, sometimes we need to refresh a page after an amount of time. Maybe to reload some data, to keep it up-to-date or just during the development that you're styling the page and need to see the changes. For that, one of the possibilities is using the meta tag bellow:

```html
 <meta http-equiv="refresh" content="TIME_TO_RELOAD_ON_SECONDS;URL=PAGE_NAME">
```
That's all folks!
Should you use Excel for survey data cleaning
Published: 2020-06-17 19:48:05

Excel is one of the most used tool in our every-days life. Excel is good for storing data but its not data visualization tool but yet many people rely on this tool. When we export survey results we get data in csv format which is not ideal for data visualization. If we want to use it in data visualization tools like Tableau, PowerBi, Spotfire etc we need to clean survey data. This is a good article by VizualSurvey about [cleaning survey data](https://vizualsurvey.com/blogs/cleaning-survey-data/).

**Alternatives for Excel:**

VizualSurvey: Its the best easy solution to clean survey data. You just need to upload survey data and with some simple steps your survey data will be ready for visualization. Another good thing is it has prebuilt templates of data visualization tools so you don't have to make any new report.

Altrex: Alteryx produces a few information investigation arrangements. Alteryx spends significant time in self-administration investigation with a natural UI. These investigation can be utilized as Extract, Transform, Load (ETL) Tools inside the Alteryx system. The items work with various information sources and perform complex examination, including prescient, spatial, and factual.

Tableau Prep Builder: It is a tool in the Tableau item suite intended to make preparing your information simple and natural. Use Tableau Prep Builder to consolidate, shape, and clean your information for investigation in Tableau.
How to Measure Corporate America‘s Reaction to #BLM using Headless Browsers
Published: 2020-06-17 19:31:26

The fight for freedom is at core of being a human, and that’s why after much patience, these past few weeks **Black Lives Matter** movement has taken US by storm.

Another storm that hit us in 2020 has been **Coronavirus!** since the start of the pandemic, pretty much every US company has had a reaction to it. Whether it being closing down stores, implementing new service policies, laying employees off, community outreach and of course sending out emotional letters! I received many Covid-19 emails from sites I forgot I had an account with! Good timing, cuz now I can just delete my account altogether!

So is there a way to measure up how US brands are reacting to these two very different but equally important events? can we some how capture and visualize the number of times and mentions each corporate has had in each case.

    Do Not worry, headless browsers are here to rescue!

So let’s find out how headless browsers can help us analyze the most powerful US brand have so far reacted to these 2 trends comparatively.

We have selected 5 top American corporates, [Amazon](http://amazon.com/), [Tesla](https://www.tesla.com/), [Microsoft](https://www.microfost.com/), [Ford](https://www.ford.com/) & [Chevron](https://www.chevron.com/), to analyze the use of BLM & Covid-19 related terms on.
Let’s Code Up!

As you can find in the [Github code base here](https://github.com/ZeroBrowser/0Browser-blm-vs-covid), we use a headless browser to capture a snapshot of each brand’s corporate landing and news/blog page.

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

Then we analyze the captured images using OCR technology provided by [Google Cloud Vision API](https://cloud.google.com/vision/overview/docs/get-started) to extract out all text. You can view this data on the graph below.

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

As you can see, Tesla & Ford mentioned Covid-19 related terms but failed to show any kind of support for the BLM movement. On the other hand Amazon, Microsoft & Chevron showed up quite fairly to both causes, with Chevron, a classic American corporate to lead the support in this comparison.
Conclusion

To put all the stuff we talked about in a real practical context, we can check out a demo of how 0Browser , a headless browser as a service,

measures corporate americas support for current causes such as BLM movement and Covid-19 using Google OCR lib [here on Github](https://github.com/ZeroBrowser/0Browser-blm-vs-covid).

Feel free to use any programming language you want for this but we are using Java-Script and Node for this.

You can find the full story here on 0Browser blog
Blank SFSafariViewController
Tags: swift, ios, apple
Published: 2020-06-11 12:03:56

---
title: Blank SFSafariViewController
published: true
date: 2020-06-08 00:00:00 UTC
tags: swift,iOS,Apple
canonical_url: https://blog.rizwan.dev/blog/blank_safari_viewcontroller
---

Recently We got continuous report from our clients saying they were getting blank In-App browser (`SFSafariViewController`) instead of the web page it was intended to show. After a little bit of debugging I figured out that It was actually bug from iOS side.

There is even a radar about it which you can find [here](http://openradar.appspot.com/22972440). Looks like it was intentionally done by Apple. Here is the response from the radar

> This is done to ensure SafariViewController can’t be used for loading content offscreen.

In our app, we don’t actually load anything offscreen. There could be some delay to present the `SFSafariViewController`. These are the possible fix I found on the internet.

- Make a delay before presenting the view controller
- Load the view before in hand
- Make the current window as key window

Adding delay is not user friendly so let’s not look into that.Loading view before in hand works on some cases.

```swift
let controller = SFSafariViewController(url: url)
controller.delegate = self // load the view before in hand
present(controller, animated: true, completion: nil)
```

Other option would be make the current window as key window (only incase if you use multiple windows)

```swift
let window = << your current window >>
window.makeKey()
let controller = SFSafariViewController(url: url)
controller.delegate = self
present(controller, animated: true, completion: nil)
```

What actually works for my case is to present the `SFSafariViewController` from key window root view controller instead of some view controller in the view hierarchy.

```swift
 func openUrl(_ urlString: String, from viewController: UIViewController, completion: (() -> Swift.Void)? = nil) {
    guard let url = URL(string: urlString) else {
        showIncorrectUrlAlert(urlString, from: viewController)
        return
    }

    let vc = SFSafariViewController(url: url)
    vc.delegate = viewController as? SFSafariViewControllerDelegate
    // Present with window root view controller to avoid blank SFSafariViewController
    keyWindow?.rootViewController?.present(vc, animated: true, completion: nil)
}
```

My guess for this issue or fix would be disconnected view when you push safari view controller that causes window changes.
Blocking user selection on css
Tags: css, html, webdev, frontend
Published: 2020-06-17 19:30:01

Hey guys, on this tutorial we're going to see how to block a user selection, so, preventing from coping the text.

<p style="-webkit-user-select:none;-moz-user-select: none;-ms-user-select: none;user-select: none;">This is pretty simple and where going to use the `user-select` property. For this example we're going to use a simple paragraph with a lorem ipsum.</p>

```html
<p>
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam est sem, sodales vitae maximus sit amet, ornare nec ligula. Sed iaculis leo velit, in lobortis libero laoreet faucibus. Aliquam imperdiet sem eget quam dignissim, ut rutrum elit consectetur. Nulla tristique quam et vulputate sagittis. In luctus non nibh at volutpat. Vivamus eleifend pharetra dolor at placerat. Quisque id libero ut sem mollis commodo quis vitae nibh. In tincidunt pharetra venenatis. Nulla facilisi. Phasellus rutrum laoreet lacus, at mattis nunc volutpat et. Nulla facilisi. Phasellus in dui id leo facilisis vehicula. Praesent eleifend augue lectus, id aliquam felis consectetur sit amet. Nullam maximus convallis tortor, non dapibus leo ullamcorper et. Nulla in nunc eleifend, posuere diam vel, volutpat metus. Nullam at mollis tortor.
</p>
```
So, on the css where going to put the property, it has the following syntax `user-select: auto | none | text | all;`

```css
-webkit-user-select:none; /* Safari 3.1+ */
-moz-user-select: none;/* Firefox 2+ */
-ms-user-select: none;/* IE 10+ */
user-select: none; /* Standard syntax */
```
That's all folks!
Published "DevSecOps for .NET Core" with Apress
Tags: dotnet, devops, opensource, github
Published: 2020-06-17 19:10:59

My book **DevSecOps for .NET Core** got published and is now available to be purchased. The goal of the book was to share how you can add the _security_ bit to your .NET Core applications. The core features of the book as I wrote it are:

1. Learning how DevOps can make heavy use of security to improve the development experience.
1. Explaining what _security_ means in the DevSecOps.
  * Security is for automation.
  * Security is for compliance.
  * Security is for quality and test.
  * Security is for continuous feedback, reviews and improvement.
1. Sharing open source tools and packages that can be used to improve software development and deployment.
1. Helping reader learn how to innovate DevOps pipelines to ensure each phase of DevOps results in utmost quality product.

![DevSecOps for .NET Core by Afzaal Ahmad Zeeshan, published by Apress](https://dev-to-uploads.s3.amazonaws.com/i/jvaprtd9rcr1dsxv9q52.jpg)

You can get a copy of book from [Amazon](https://www.amazon.com/DevSecOps-NET-Core-Securing-Applications-dp-1484258495/dp/1484258495) and [Apress](https://www.apress.com/gp/book/9781484258491).
Happy in tech, regardless my sexuality
Tags: devpride, pride, community
Published: 2020-06-17 19:01:10

---
title: Happy in tech, regardless my sexuality
published: true
description: I'm bi, and everyone around me in personal and professional environment is totally okay with it. I wish the same to everyone.
tags: devpride, pride, community
---

I wanted to join in the **#devpride**, as I think this is a nice community to be open with. To be honest I never had a problem with my sexuality in the job, and I'm so happy and lucky about that, true thing I don't usually speak about my bisexuality at work, but when I did at first I felt uneasy... for a few seconds before realizing it wasn't a problem to my work mates. **This month, and all the year, I just wish the same luck for everyone in this already difficult 2020**.

## I'm proud of...

Being part of large communities that usually welcome tons of LGBTIQ friendly people and activists: Security experts and Makers. It just feels great to know most of the persons around you are not just good professionals, but great pals.


## Equality in tech looks like... 

Everyone listening to each others and learning from both professional and personal experiences! 


## I find support in...
My friends in tech, ex-workmates and current workmates!
Espaços Makers:  tecnologia, inovação e transformação

Published: 2020-06-17 18:51:15

Em pleno século XXI é estranho que alguém tente explicar o conceito de tecnologia, mas a questão é que acabamos por esquecer da história. Passamos a acreditar que tecnologia se baseia em informática, aparelhos eletrônicos e coisas do gênero, só que na antiguidade eles não tinham nada disso e mesmo assim faziam coisas inovadoras e tecnológicas. Tecnologia nada mais é do um conjunto de métodos, técnicas ou ferramentas que auxiliam no desenvolvimento de algo ou aprimoram a prática para uma maior eficiência, levando em conta as necessidades da época.
	Pensando nisso, imaginem um espaço que contasse com diversas ferramentas, sejam eles manuais ou eletrônicos, onde você tivesse livre acesso, podendo assim também construir coisas inovadoras. Seria realmente fantástico e que bom que já existe. 
Esses espaços é o que chamamos de “Espaço Maker”, ele pode existir em diferentes formas, com vários enfoques, ter todo o tipo de ferramentas, estar localizado em qualquer lugar e é aberto para todos. A iniciativa de ter um espaço maker já é inovador por si só, além de ter a possibilidade de construir “quase qualquer coisa”, ele também expande os horizontes, proporciona interações entre as pessoas ocasionando uma troca de saberes incrível. Mais do que produzir algo físico, é possível desenvolver e aprimorar habilidades já existentes, aprender coisas novas sem aquele formato antigo de sala de aula, desenvolvendo a criatividade e autonomia.
Como dito anteriormente, os espaços makers podem estar localizados em qualquer lugar, desta forma eles são responsáveis por levar conhecimento para todos. Em regiões periféricas de grandes cidades eles dão novas oportunidades para os moradores, incentivando e auxiliando-os o desenvolvimento de novas habilidades, ou dando recursos para projetos em desenvolvimento. Os espaços makers podem abrir horizontes, criar uma rede de compartilhamento de informações e conhecimentos onde você pode aprender e ensinar, mostrar todo o potencial das pessoas, incentivar a criatividade, proporcionar contato com ferramentas digitais e não digitais
E como eles podem estar em qualquer lugar, também podem ser de diferentes formas. Existem denominações que diferem um pouco os espaços makers e também o enfoque do que é desenvolvido lá dentro. Por exemplo, os FabLabs são uma rede de laboratórios que o seu enfoque é em produção a partir de máquinas. Também existe o hackerspace que são laboratórios com o mesmo ideal de ser algo de livre acesso, porém é mais voltado para a área da informática, desenvolvendo e utilizando de softwares e hardwares opensource.
Quando se entra em um espaço maker é como se estive entrando no guarda roupa de Nárnia, lá você encontra um mundo totalmente novo. Vá encontrar a sua Nárnia, e depois nos conte como foi!
Vi (Vim) Text base editor regular commands
Tags: linux, devops, beginners, productivity
Published: 2020-06-17 18:48:01


Vi (Vim) Text base editor regular commands. Should be used to, on these commands. It will save you life.


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



👌 Thanks for your time & passion. Feel free to ask me anything.
If you have any issues & queries. [Follow me on Twitter ](https://twitter.com/eng_sadhan)
Look for Nuke Launchers in Haskell
Tags: watercooler, haskell, rust, security
Published: 2020-06-17 18:46:16

Haskell programmers like to tell people that in other languages if you use some library and that library launches a nuclear missile, you wouldn't know.

Turns out you wouldn't know necessarily in Haskell either. If you use any significant framework, there is a good chance you use its provided monad stack, which if contains `IO`, can launch a nuclear missile. 

To this end, `IO` in Haskell is like `unsafe` in Rust. It significantly reduces audit surface, but you still need to be vigilant to audit it. Perhaps not surprisingly, the way Rust markets its safe subset is similar to how Haskell markets its pure subset.

Stay vigilant.
Analysing the Tone of Tweets with Keras
Tags: python, machinelearning, keras, sentiment
Published: 2020-06-17 18:39:12

This is a write up of a live coding session from my show "ML for Everyone" broadcast on the [IBM Developer live streaming Twitch channel](https://developer.ibm.com/livestream) every Tuesday.

This session was an attempt to train a neural network to detect the sentiment of tweets. Specifically I wanted it to be able to detect joyful tweets for my #gftwhackathon entry:

{% post https://dev.to/hammertoe/joyful-tweets-3jpf %}

This is a follow on from the previous session in which I used an existing sentiment analysis service, IBM Watson Tone Analyzer to detect sentiment. Using that service was nice and quick to get going, but it only allowed me to send one tweet at a time to it, which resulted in the service being quite slow, or me hitting rate limits of the service. So this is the beginnings of creating my own simpler version of that service.

{% post https://dev.to/hammertoe/live-coding-my-dev-gftw-hackathon-entry-11b6 %}

## Session recap

In this session I used IBM Watson Studio to analyse the content of around 800,000 tweets I downloaded from twitter. Each tweet contained one of the words: joy, anger, angry, happy, sad.

The goal was to create and train a neural network using Keras, a high level Python API, to learn what a 'joyful' tweet might look like.

The basics steps of the process were:

1. Download a selection of tweets, about 800,000 in total from Twitter's API
2. Categorise those tweets into being either 'joyful' or 'angry'. I used a pretty naive crude regular expression match for this.
3. Tokenise the tweets, using a tokeniser in the Kera preprocessing package that split the words up and lowercased them
4. Download a pre-trained "word vector" that represents words in tweets as a 100-dimensional vector.
5. Create a neural network consisting of two LSTM layers (ideal for learning word sequences) with dropout layers to prevent overfitting.
6. Load the word vector from above into the embedding layer of the network
7. Train the network on the processed tweets
8. Evaluate the network performance with a few real world examples

## Python notebook

The [full Python notebook for this session](https://github.com/IBMDeveloperUK/ML-For-Everyone/blob/master/20200609-Analysing-Tweet-Sentiment-with-Keras/sentiment-analysis.ipynb) is in the Github repository for this session:

{% github IBMDeveloperUK/ML-For-Everyone no-readme %}

## Conclusion

Well, it seemed to work. Looking at the examples we tested on we got:

"I love the world": 53% joy; 47% anger
"I hate the world": 22% joy; 78% anger
"I'm not happy about riots": 45% joy; 55% anger
"I like ice cream": 63% joy; 37% anger

The next steps will be to take this trained model and deploy it as a service such that we can then query it from the Joyful Tweets application.

I hope you enjoyed the video, if you want to catch them live, I stream each week at 2pm UK time on the IBM Developer Twitch channel:

https://developer.ibm.com/livestream
Basic Git Cheat Sheet
Tags: git, github
Published: 2020-06-17 18:37:45

# Need to Know git commands
1. **git init** (Initialize git repository)
2. **git checkout {branchname}** - change the working branch
3. **git checkout -b {branchname}** - create a branch and change the working branch into it
4. **git status** - check for untrack and tracked files
5. **git add .** - track changes in all files in the working branch
6. **git add {filename}** - track changes in one file
7. **git commit -m “message”** - save changes to local repository
8. **git remote add origin {remote url}** - connecting to a remote repository
9. **git push origin {branchname}** - push code from local to remote
10. **git push -u origin {branchname}** - push code from local to remote on a branch that doesn't already exist on remote
11. **git merge {branchname}** - merge changes from {branchname} into the current working branch

**Note:** Please remember not to work on master branch directly, always create different branches for different purposes.
Generate Release APK (app-release.apk) in React Native for Android
Tags: reactnative, releaseapk, react, android
Published: 2020-06-17 18:32:28

Here I'm writing some very simple and easy steps to generate release APK for android that is also used to upload and publish to play store.

#Step One

First of all you have to generate your store key file. So, go to your 
**C:\Program Files\Java\jdk1.8.0_251\bin**
folder and open command prompt (Open as an administrator that is a best practice) and paste this below line

**keytool -genkey -v -keystore your_key_name.keystore -alias your_key_alias -keyalg RSA -keysize 2048 -validity 10000**

Now you will be asked some simple queries like password, your organizational name etc. Give them an answer. After completing this process you will see your generated store key file at your

**C:\Program Files\Java\jdk1.8.0_251\bin**
folder.

#Step Two

Now come to your **android/gradle.properties** and setup your gradle variables

**MYAPP_RELEASE_STORE_FILE=your_keystor_ename.keystore
MYAPP_RELEASE_KEY_ALIAS=your_keyalias
MYAPP_RELEASE_STORE_PASSWORD=your_pass
MYAPP_RELEASE_KEY_PASSWORD=your_pass**



#Step Three

Now you have to come in your **andoid/app/build.gradle** and setup your signingconfig

**android {
signingConfigs {
release {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}**


Now you are all done. Go to your android folder and generate release apk by this command

**gradlew assembleRelease**


Let me know if you get any sort of error! I will be glad to helping you out! Thanks
React, how to use useState() method
Tags: react, javascript, webdev, html
Published: 2020-06-17 18:31:37

When I started the use with React, a thing that bodereds me was the method useState().

So I understood that we have two types of storage when working with React,

- Memory storage and;
- Component storage,

And finally, with that vision, I managed to absorbed the knowledge about the use of useState() method.

After that, I built a gif to turn my words clear,

![Memory storage x Component storage](https://dev-to-uploads.s3.amazonaws.com/i/kurztbmpjvihyzehfkpr.gif)

Summing up, you can change values without useState(), but what you're changing is the value in browser's memory, not in the React Component. To do that you have to use useState().

That's all folks!