teleren/devto huggingface dataset:
Show/Hide Password in EditText in Android
Tags: android, coding, mobile, todayilearned
Published: 2018-11-14 09:40:37

---
title: Show/Hide Password in EditText in Android
published: true
tags: android, coding, mobile, til
canonical_url: https://android.jlelse.eu/show-hide-password-in-edittext-in-android-4c3e9ce94156
---

#### How to show/hide the password dots in the EditText in android in one line

> This article is part of [Today I Learned](https://medium.com/p/65c64e1dcb6) series and was originally posted at my [TIL Github Repository](https://github.com/wajahatkarim3/Today-I-Learned/) and my website at [wajahatkarim.com](http://wajahatkarim.com)

With the Material design and latest Material Theming, android developers often use TextInputLayout and its great password toggle functionality. But, sometimes your applications have legacy designs like this:

![](https://cdn-images-1.medium.com/max/403/1*A_JaZR1u_LSG7kj2XIoZWA.png)

In these cases, you will have to show/hide password with a CheckBox and its OnCheckedChangeListener . So, recently I had to do this and relying on the TextInputLayout ‘s automatic password toggle functionality, I forgot how to do this. So, here’s how its done which I have learned.

#### Dummy Layout

![](https://cdn-images-1.medium.com/max/1024/1*emHoVTmlyfk_DQZgVqU4VQ.png)

Now, you can toggle the password with [EditText#setTransformationMethod()](https://developer.android.com/reference/android/text/method/TransformationMethod) like the code below:

![](https://cdn-images-1.medium.com/max/1024/1*IZs1t9k3N5IfKu_dj8nkLg.png)
Poco — project orchestration. Introduction.
Tags: docker, productivity, containers, kubernetes
Published: 2018-11-14 09:31:51

---
title: Poco — project orchestration. Introduction.
published: true
description: 
tags: docker, productivity, containers, kubernetes
---
![containers](https://thepracticaldev.s3.amazonaws.com/i/zq0vhdhy02d8gl2hj26k.jpeg)
Recently I've wrote article [Poco — project orchestration. Introduction.](https://medium.com/@iamfrntdv/poco-project-orchestration-introduction-f2a834db965d). It's about an open source tool we've built to help our developers in everyday development's routine.
Are we Developers helping Google to build an unstoppable monopoly?
Tags: discuss, google, webdev
Published: 2018-11-14 09:02:06

---
title: Are we Developers helping Google to build an unstoppable monopoly? 
published: true
description: Google was awesome because of the fact that it provides us with great tools for free. But we have paid a huge cost for that.
tags: #discuss #google #webdev
cover_image: https://thepracticaldev.s3.amazonaws.com/i/vhv93h84pnde3fyuzvf9.jpg
---
Like you, I was also a fan of Google, but things that have been happening recently with Facebook have made me come to a grave realization. If Facebook has this much data on us and has shadow profiles of people who don't even use the platform, then we should be very worried about the amount of data Google has on us.
With free tools like Google Search, Google Fonts, Google Maps, Google Analytics etc. Google has been tracking our users to an extent that can infiltrate their privacy and then eventually manipulate them using ads.

What are your thoughts on this? How can we make a change? Or should we leave things the way they are?
Colorful Console Message In Javascript
Tags: javascript, react, reactnative, android
Published: 2018-11-14 08:48:56

---
title: Colorful Console Message In Javascript
published: true
description: Colorful Console Message In Javascript
tags: #javascript #react #reactnative #android 
---

Post Link : <a href="https://www.skptricks.com/2018/11/colorful-console-message-in-javascript.html" >Colorful Console Message In Javascript </a>

This tutorial explains how to display colorful console message in javascript. Especially if you have a huge application where there are tons of logs being printed out in the browser console. Styling your log message will make sure those important messages get displayed and don't get buried.

<a href="https://www.skptricks.com/2018/11/colorful-console-message-in-javascript.html" >Colorful Console Message In Javascript </a>

<img src="https://4.bp.blogspot.com/-_c_q7MNLWtk/W-vXh2y1miI/AAAAAAAACJE/9QBvxvLLxxo0QBNelsbCfHFNR0FrEZqHACLcBGAs/s400/console.png" />
Understanding Currying in JavaScript
Tags: javascript, react, reactnative, android
Published: 2018-11-14 08:47:54

---
title: Understanding Currying in JavaScript
published: true
description: Understanding Currying in JavaScript
tags: #javascript #react #reactnative #android
---

Post Link : <a href="https://www.skptricks.com/2018/11/understanding-currying-in-javascript.html" >Understanding Currying in JavaScript </a>

This tutorial explains how to create currying function in javascript.  Basically currying is the process of taking a function with multiple arguments and returning a series of functions that take one argument and eventually resolve to a value.
Or in another you can say,

<a href="https://www.skptricks.com/2018/11/understanding-currying-in-javascript.html" >Understanding Currying in JavaScript </a>

<img src="https://3.bp.blogspot.com/-vv_-2k6aI4k/W-rgmiD5uSI/AAAAAAAACIk/evkYq_xbxaoDwBS1HLZJ3kHVTPpLFd3_ACLcBGAs/s400/curring.png" />
A complete guide to default props in React
Tags: javascript, react, reactnative, android
Published: 2018-11-14 08:46:24

---
title: A complete guide to default props in React
published: true
description: A complete guide to default props in React
tags: #javascript #react #reactnative #android
---

Post Link : <a href="https://www.skptricks.com/2018/11/a-complete-guide-to-default-props-in-react-app.html" >A complete guide to default props in React </a>

This tutorial explains how to use default props in react application. A React component is simply a JavaScript function that takes an object of arbitrary inputs known as props and returns React elements describing what should be rendered on the UI. Similarly in this example we are using static property of ES6 class that will pass static object parameter as props in react application.

<a href="https://www.skptricks.com/2018/11/a-complete-guide-to-default-props-in-react-app.html" >A complete guide to default props in React </a>


<img src="https://3.bp.blogspot.com/-ueJ7Pdx_cF8/W-pxZHHrCMI/AAAAAAAACIY/1eRYBspfRZMnIB1pzGepKhP3pRPCXmSVACLcBGAs/s640/default.png" />
Understanding Static In Javascript With Examples
Tags: javascript, react, reactnative, android
Published: 2018-11-14 08:44:58

---
title: Understanding Static In Javascript With Examples
published: true
description: Understanding Static In Javascript With Examples
tags: #javascript #react #reactnative #android
---

Post Link : <a href="https://www.skptricks.com/2018/11/understanding-static-in-javascript-with-examples.html" >Understanding Static In Javascript With Examples </a>

This post explains How to use static variables in a Javascript function. JavaScript doesn’t support static variables. It doesn’t provide static keywords. But using a small tip, we can implement function static variables in JavaScript and use them for our purposes.

<a href="https://www.skptricks.com/2018/11/understanding-static-in-javascript-with-examples.html" >Understanding Static In Javascript With Examples </a>

<img src="https://3.bp.blogspot.com/-Emv_Ek-RjXk/W-pOuioRyyI/AAAAAAAACIM/xbVXiRbKsR88r6S2p47k8XTWoXg70c2DACLcBGAs/s400/static.png" />
What we should know about crypto exchange software
Tags: cryptocurrency, cryptoexchange, bitcoinsoft, cryptosoft
Published: 2018-11-14 07:13:52

---
title: What we should know about crypto exchange software
published: True
description: The post runs about crypto exchange software
tags: cryptocurrency, crypto_exchange, bitcoin soft, crypto soft 
---
Many users are interested in creating cryptocurrency, and especially bitcoin exchange platform. Some of users don’t trust cryptocurrency market because nobody could keep under control its changes and the Government of any country couldn’t help you if you lose money after fail while investing money.  
At any case lots of users are ready to invest in bitcoin or other cryptocurrency. To be successful you need professional crypto exchange software.
But before choosing trading software script you need to know the core requirements to it and to the market in general. First of all think over in what country you’d like to run the business. You should know the laws of the chosen country corresponding to cryptocurrency.
 You may read in details about crypto exchange software here http://merehead.com/blog/how-build-cryptocurrency-exchange-software/ 
The users of the crypto exchange software could be also called its members. Of course they develop this sphere rapidly. To start it successfully you should know your customers and prepare reliable Anti-Money Laundering system. Don’t miss user indefication it would help you follow the 1-st point: know the customers you’re dealing with. You shouldn’t know them deeply but do verification through ID or international passport or at least driver’s license. Take to consideration that different countries have different requirements to this.   
Don’t forget that crypto exchange software demands the following components: 1) Graphical interface. 2) Reliable secure system forall the participants: owners, administrators, customers. 3) Trading engine. 4) Cryptocurrency wallets. 
It’s not the whole list but in general these components should be perfect and it opens before you lots of opportunities in this sphere.
Roast my portfolio
Tags: help, career
Published: 2018-11-14 06:10:41

---
title: Roast my portfolio
published: true
description: Need some constructive criticism on my portfolio.
tags: help, career
---

I could use some criticism on my portfolio site. Every time I update it there is usually something that nags me about it like I'm doing something wrong with it. Or I'm missing something.

I'd be happy to hear how the portfolio isn't up to snuff.

spirofloropoulos dot com.
Eat the frog
Tags: discuss
Published: 2018-11-14 04:28:27

---
title: Eat the frog
published: true
description: 
tags: discuss
---

@thekitze tweeted today 

I've read "Eat That Frog" ~6 years ago but I never implemented the method. It's about "eating a frog" or doing the shit you *hate* (or avoid) to do, first thing in the morning. After that proceed with the rest of the "fun" stuff. 

I'm doing it for 3 days and it's amazing 👍️

I think I might try this out. I have never read the book, but it sounds interesting. I usually do the opposite and keep my mornings easy going and stress free. What do you all do? I think stress free mornings set me up to be in a good mood all day.
JavaScript Variables
Tags: variablesjavascript
Published: 2018-11-14 01:29:26

---
title: JavaScript Variables
published: true
description: We take a look at JavaScript variables, how they work, and some best practices when using them.
tags: variables JavaScript
---

   Variables are everywhere in programming. It makes the process a bit like algebra in that you have an understanding that variables represent some data so you don't have to constantly reenter the same data over and over throughout the application. It also works to make values mutable across the app, allowing you to have a flow of logic that goes beyond hard coding answers into problems. Additionally variables allow you to make a minor change in the value at some point in the code and have it carry across the program. The key to maximizing the use of variables (and any part of programming or even perhaps life in general) comes down to understanding how they work. You must look under the hood and see how the engine works to fix the car.

   There are few types of variables in JavaScript when compared to more basic languages like Java and C#. This doesn't however change what types of values can be stored in variables as it is still the conventional types of numbers, strings, booleans, and arrays (though they are objects and objects can also be thought of as variables). 

   Starting with the basics, lets declare variables. The most basic variable declaration in JavaScript is "var". This sets the scope of the variable to the execution context to the whatever its declared in. That means if it was declared in a function, it still has global scope. Using "let" then allows you to set block scope for a variable. The type "const" forces you to declare its value on declaration but it can still change if its an object.

   Naming variables is more form than function. And by form I mean that whatever you name it has to be for the sake of you and others reading your code. Your names should establish in a quick few terms what the variable represents and perhaps what it is used for. Some conventions for naming is to use cammelCase for most variables and ALL_CAPS for constants.

   Assignment of variables is done with the "=" operator with the variable on the left and a value on the right. Note that this is different than "==" which is a value comparison and will result in a true/false return value (also this ignore the data type as 4 == "4" will return true, 4 === "4" will not). Some quick assignment shortcuts include "+=" to add to the original variable, the same is true for "-=", "*=", and "/=" for their respective operations. When variables are first declared, unless given a value on declaration, will have the value of undefined.

   Overall JavaScript is a smart language. So variables are going to be simple. But this doesn't diminish the subtlety of their implementation. I certainly didn't cover everything in this and the technicality gets even deeper. Perhaps I will comeback to this subject soon and bring a whole new bag of tricks to the table.
Machine Learning With ML.NET
Tags: dotnet, machinelearning
Published: 2018-11-15 12:42:17

---
title: Machine Learning With ML.NET
published: true
tags: dotnet, machinelearning 
canonical_url: https://www.telerik.com/blogs/machine-learning-with-ml-dotnet
---

This time on the Eat Sleep Code podcast, we talk to Microsoft's John Alexander about exciting new Machine Learning libraries for .NET.

On this episode of [Eat Sleep Code](https://soundcloud.com/esc-podcast), Sr. Content Developer at Microsoft John Alexander talks about [ML.NET](https://www.microsoft.com/net/apps/machinelearning-ai/ml-dotnet), a set of new Machine Learning libraries for .NET. John explains the purpose of ML.NET and how it enables .NET developers to incorporate machine learning into their .NET (C# & F#) applications. ML.NET basics, extensiblity, and road maps are all discussed.

You can listen to the [entire show](https://soundcloud.com/esc-podcast/machine-learning-with-ml-dot-net) and catch [past episodes](https://soundcloud.com/esc-podcast) on SoundCloud. Or just click below.

<iframe width="100%" height="166" scrolling="no" frameborder="no" allow="autoplay" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/499496673&amp;color=%23ff5500&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;show_teaser=true"></iframe>
## John Alexander

![John Alexander, Sr. Content Developer at Microsoft](https://d585tldpucybw.cloudfront.net/sfimages/default-source/default-album/ja.jpg?sfvrsn=bc7a097c_1 "ja")  
[John Alexander](https://twitter.com/JohnAlexander) is a client-centric, UX-focused software architecture and development thought leader, and noted Microsoft Regional Director, consultant, trainer, published author and speaker.

## Show Notes

- [ML.NET on GitHub ](https://github.com/dotnet/machinelearning)
- [ML.NET Samples on GitHub](https://github.com/dotnet/machinelearning-samples)
- [ML.NET Documentation](https://docs.microsoft.com/en-us/dotnet/machine-learning/)
- [DevUp Conference](https://devupconf.org/)
- [NDC Sidney](https://ndcsydney.com/)

### Transcript

Coming soon...
Github Campus Expert
Tags: github, expert, discuss
Published: 2018-11-13 20:31:41

---
title: Github Campus Expert
published: true
description: 
tags: github, expert, discuss
---

I was accepted on the GitHub Campus Expert Program. And now will have to go through a 7 series of training modules in order to be a GitHub Campus Expert. Anyone that has ever gone through the same training? Any advice? Tips? 

**waiting**
Little partial application challenge in Haskell
Tags: challenge, haskell
Published: 2018-11-13 20:06:30

---
title: Little partial application challenge in Haskell
published: true
description: Correct a function that maps a list.
tags: challenge, haskell
---

Correct a function that maps a list of negative numbers.

Input: [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0]

Output: [-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1]

A function that I wrote but that results in a mistake.

```haskell
map (-1) [-10..0]
```

This can be solved using lambda

```haskell
map (\x -> x - 1) [-10..0]
```

The challenge is to solve it with partial application.
A short list of Data Science resources #2
Tags: datascience, python
Published: 2018-11-13 19:57:50

---
title: A short list of Data Science resources #2
published: true
description: 
tags: #datascience #python
---

Last week I started to contribute to dev.to writing a [post](https://dev.to/nicologiso/a-short-list-of-data-science-resources-12de) about some useful resources on which I stumbled upon in my daily job as a data scientist. I decided to repeat the "experiment", gathering some other tools and articles that I found in the last seven days, hoping that can be of interest also for somebody else:

- The Data Viz Project offers all the possible graphs you can think of, with a detailed description and a bunch of examples https://datavizproject.com

- In Python tuple unpacking makes code more readable, for instance avoiding hard coded indexes. Despite the name it works with any iterable. For a nice introduction: https://treyhunner.com/2018/03/tuple-unpacking-improves-python-code-readability/

- Sometimes it's cool to have a basic GUI in top of your command line program in Python without spending hours doing it. Check out the Gooey package https://github.com/chriskiehl/Gooey

- DeepL Translator uses convolutional neural networks built on the Linguee database to give high quality translation https://www.deepl.com/en/translator

If you have any feedback or cool resources, please share them in the comments!
How to write articles if you are non-native English speaker?
Tags: discuss
Published: 2018-11-13 19:14:35

---
title: How to write articles if you are non-native English speaker?
published: true
tags: discuss
---


I'm not a native English speaker, and I don't know how I can write without making any grammatical mistakes, I know that it's almost impossible. Several times I have thought "Hey this is interesting to share in dev.to" but I'm afraid of someone reads about and doesn't understand my point of view.

What are the recommendations that you can give to people like me? Another point is that I'm studying English.

Thanks a lot, guys.
WebSocket vs. Long polling HTTP
Tags: websocket, http, socketio
Published: 2018-11-13 18:51:50

---
title: WebSocket vs. Long polling HTTP
published: true
description: Comparison between WebSocket and Long Polling HTTP
tags: WebSocket, HTTP, Socket.io
---
#####
WebSocket is a standard protocol for two-way data transfer between a client and a server.  The webSocket protocol is built on TCP, not running on over HTTP protocol.  Using HTTP polling is hugely disadvantageous as it wastes resource and may cause connection time out. 

I recently worked on Chatapp using AJAX for storing chat history to DB on the server side.  The server side also runs Socket.io.   As AJAX was to GET/POST chat data to DB on server side, I didn't expect the Socket.io client would also use HTTP AJAX polling for socket.io but it did use HTTP polling over AJAX.  

Here is brief explanation of the difference between HTTP long polling via AJAX and WebSockets only.  
  
With long polling via AJAX, the server keeps polling WSGI server to check any new data.  HTTP is not meant for keeping the connection open for the server to send frequent data to a client.   The following is a sort of old way of implementing long polling via AJAX requests. 

![alt text](https://thepracticaldev.s3.amazonaws.com/i/4jbq91rqm8fx9ynx0mnt.png "long polling http")

By using WebSockets, the server response (or data push) is more efficient.  Server side does not need to keep sending no payload packet to a client.   Its benefit is more distinctive as a server serves a large number of clients.  

![alt text](https://thepracticaldev.s3.amazonaws.com/i/05ml4nkyjmo8k2dxr96j.png "WebSocket")

If you still need to use AJAX and Socket.io together, you could still force Socket.io to use Websocket only.   The following method would even remove any initial XHR request to initiate Websocket between client and server.   That is fantastc!

**Server Side:**
 
The 2nd line of the following can force the server to use WebSocket only.  

```javascript
module.exports = function(io) {
io.set('transports', ['websocket']); 
io.on('connection', socket => {
socket.on('join', params => {

```
**Client Side:**

The 1st line of the following is tells Socket.io client to use WebSocket only even though AJAX is used in the same client code.  

```javascript
const socket = io({ transports: ['websocket'] });
const postMessage = function(message) {
$.post('http://localhost:5000/api', message);
};

```


This simple trick works fine with the most modern web browsers except old IE9.   It is recommend avoiding any XHR fallback and only use WebSockt transport.   

Reference: 
https://www.fullstackpython.com/websockets.html
I try to build and run new dev.to iOS App
Tags: devto, ios
Published: 2018-11-13 17:34:36

---
title: I try to build and run new dev.to iOS App
published: true
description: build and run new
tags: devto,ios
---

<blockquote class="twitter-tweet" data-lang="ja"><p lang="en" dir="ltr">DEV now has an iPhone app.<br><br>Very much still a work in progress, but they say if you’re not embarrassed by your first version, you waited too long. Right?<br><br>Let me know what you think:<a href="https://t.co/CgWzdSuWtp">https://t.co/CgWzdSuWtp</a> <a href="https://t.co/RDG1z8WlYO">pic.twitter.com/RDG1z8WlYO</a></p>&mdash; Ben Halpern 🤗 (@bendhalpern) <a href="https://twitter.com/bendhalpern/status/1061323718058786822?ref_src=twsrc%5Etfw">2018年11月10日</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> 

https://github.com/thepracticaldev/DEV-ios/


I tried to build and run this app.

clone repository, and push run button on Xcode.

![error](https://pbs.twimg.com/media/Dr1ZyfDVsAEhNaE.jpg)

ops! build err. I need "PushNotifications"

I read READ.MD, there is information how to build app.


>Fork and clone the project.
Install Carthage. If you use Homebrew then you can install Carthage by running brew install carthage.
Now run carthage update in the project's root directory.
Build and run the project in XCode.

I Installed Carthage on homebrew, And execute `carthage update`

After that, "PushNotifications" err was gone.

![iphone](https://pbs.twimg.com/media/Dr1brISVsAALiQH.png)

I run it on iPhone emulator on my Mac.
Starting a New Tech Job
Tags: advice, discuss, career, help
Published: 2018-11-13 17:11:13

---
title: Starting a New Tech Job
published: true
description: 
tags: advice, discuss, career, help
---

I am honored to say that I recently just got a new job which I will be starting next Monday. Still the same role (Software Engineer) but the stack is almost completely different and more responsibilities. I have this week to relax and prepare for the job. Any tips/advice on how to transition into the new job?