teleren/devto huggingface dataset:
How to tweak the Volume HUD in iOS?
Tags: ios, iosdev, appdev, code
Published: 2018-05-13 14:05:21

---
title: How to tweak the Volume HUD in iOS?
published: true
tags: ios,iosdev,appdev,code
canonical_url: https://itscoderslife.wordpress.com/2018/04/21/how-to-tweak-the-volume-hud-in-ios/
---

iOS volume change HUD is a big freaking non interactable rounded rectangle pop up. This obstructs the UI for good 2-3 seconds. This irritates me. So if there are any media apps to be developed use this technique to customize volume change feedback UI.

Now if you are developing an app and need very less irritated users or frustrated users, then never ever use feedback HUDs right in the center of the screen and that too for more than 2-3 seconds.

Now one default such HUD is Volume HUD which comes over all the applications. But good thing is you can customize it.

You need to add just 3 things in your view controller:

1. Apple’s `MediaPlayer` framework
2. A dummy instance of `MPVolumeView`​ added as a subview of your view
3. An observer to `AVSystemController_AudioVolumeNotificationParameter`

The below linked youtube video guides you on how to implment this in your project:

<iframe type="text/html" width="656" height="399" src="https://www.youtube.com/embed/tq49LUKbRLY?version=3&amp;rel=1&amp;fs=1&amp;autohide=2&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent" allowfullscreen="true" style="border:0;"></iframe>

The source code to the sample mentioned in the video is available on Github:

[https://github.com/itsdamslife/iOS-Custom-Volume-UI](https://github.com/itsdamslife/iOS-Custom-Volume-UI)

Share your feedback in here or below the youtube video.

Happy coding ![😉](https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f609.png)

[  
 ![Damodar Shenoy's DEV Profile](https://d2fltix0v2e0sb.cloudfront.net/dev-badge.svg)  
](https://dev.to/itscoderslife)

Advertisements

<script type="text/javascript">
			__ATA.cmd.push(function() {
				__ATA.initSlot('atatags-26942-5adb57912d977', {
					collapseEmpty: 'before',
					sectionId: '26942',
					width: 300,
					height: 250
				});
			});
			</script>

<script type="text/javascript">
			__ATA.cmd.push(function() {
				__ATA.initSlot('atatags-114160-5adb57912d97a', {
					collapseEmpty: 'before',
					sectionId: '114160',
					width: 300,
					height: 250
				});
			});
			</script>
Open Terminal from Xcode
Tags: ios, iosdev, macos, objectivec
Published: 2018-04-21 15:27:56

---
title: Open Terminal from Xcode
published: true
tags: iOS,iosdev,macOS,Objective-C
canonical_url: https://itscoderslife.wordpress.com/2018/04/21/open-terminal-from-xcode/
---

I love Xcode as an IDE for macOS and iOS development. But it has its own set of limitations. One feature I miss a lot is Opening a **Terminal** window from the Xcode into the same directory of the project. This will save lots of time.

Every time you want to run a git command or cocoapods or say any xcode build command – Opening a Terminal manually and changing the directory to the project directory takes at the least 30 seconds to a minute. Now what if I say you can do this

> Now, What if I say you can open a Terminal window and get to the project directory  in **1 second** or say with a shortcut key?
> 
> YES! One shortcut.

This is how you do it. It’s a one time setup.
1. Create a 2 line shell script and give the file execute permission.  
2. Go to Xcode Preferences.  
3. Add a Behavior in Xcode. Name it and give a shortcut key.  
4. On the right side details pane check the Run option.  
5. From the adjacent drop-down menu choose the script you just saved in step 1.

Here’s the video on how to do it.
https://www.youtube.com/watch?v=MMeu3xeXZxM

Script:  
`#!/bin/bash
open -a Terminal "`pwd`"
`

Command to give execute permission:  
`chmod +x /path/to/the/open_terminal.sh`

If you are lazy like me here’s the gist, download and use it: https://gist.github.com/itsdamslife/9532d757676b1f3c9b25f3959128367c

Hope this is helpful.

Happy coding ![😉](https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f609.png)

inspiration courtesy: The in-built Terminal of Visual Studio Code by Microsoft

<script src="https://gist.github.com/itsdamslife/9532d757676b1f3c9b25f3959128367c.js"></script>

-- Happy Coding :)
Watch NHK world with Linux by hitting the URL of streaming server
Tags: japanese, nhk, linux, vlc
Published: 2018-04-21 14:52:52

---
title: Watch NHK world with Linux by hitting the URL of streaming server
published: true
description: 
tags: japanese, nhk, linux, vlc
---

Have you ever watched NHK world?

NHK, 日本放送協会, is semiofficial broadcaster in Japan.

It also provide NHK world, world-wide version. It streams English movie on the internet related to Japanese news, culture, tourism, and so on.
We can watch it from windows and MacOS. 

Here a problem: I use Linux as my desktop environment, and Chromium as my default browser, how to watch NHK world?

Now, you cannot watch NHK world via Linux. It returns the error "Live streaming not available on this browser".

Don't worry, I found the way to watch it with Linux.

# How

We can directly hit the URL of streaming server with VLC media player.

- Open http://www3.nhk.or.jp/nhkworld/app/tv/hlslive_tv.xml
- Copy the first element of `jstrm` (`urls > main_url > jstrm`).
- Open VLC and Select the menu `Media > Network`
- Paste the URL and click `open`

I would love NHK to allow us watch via various Operating System, as NHK is public broadcaster.

# Appendix

I found it easy to open a media server URL with VLC. Sometimes we can record it.

# Ref

http://askubuntu.com/questions/704612/nhk-live-streaming-not-available-on-this-browser
Tig, yet another Git client
Tags: git, tig
Published: 2018-04-21 14:35:18

---
title: Tig, yet another Git client
published: true
description: Tig, a recently discovered command line Git client.
tags: git, tig
---

Yesterday I saw [this][monades] post about [tig][tig]. Tig is a
text-mode interface for Git. More goodies for those who don't want to
leave the command line!

Tig is some sort of Git IDE although you cannot create a repository
with it. You can neither push nor pull. Tig is makes history inspection
quick and easy. I don't find the commit workflow to be very
straightforward.

As for Git IDEs go, [Magit][magit] is still the #1 for me.

[monades]: https://monades.roperzh.com/weekly-command-going-over-git-history-with-tig/
[tig]: https://github.com/jonas/tig
[magit]: https://magit.vc/
Install Ranger on Fedora 27 Workstation
Tags: install, fedora, linux
Published: 2018-04-21 14:26:49

---
title: Install Ranger on Fedora 27 Workstation
published: true
description: Install Ranger on Fedora 27 Workstation
tags: Install, Fedora, Linux
---

### Picture on Imgur
<blockquote class="imgur-embed-pub" lang="en" data-id="R6lbRki"><a href="//imgur.com/R6lbRki">Linux | Fedora 27 Workstation | Ranger</a></blockquote><script async src="//s.imgur.com/min/embed.js" charset="utf-8"></script>

<blockquote class="imgur-embed-pub" lang="en" data-id="FxnG7Eg"><a href="//imgur.com/FxnG7Eg">Linux | Fedora 27 Workstation | Emacs | Ranger</a></blockquote><script async src="//s.imgur.com/min/embed.js" charset="utf-8"></script>

```
 psnebc@localhost  ~/Httrack/emacs  sudo dnf install ranger
[sudo] Passwort für psnebc: 
Zwischenspeicher für Paketquelle »Dropbox« konnte nicht synchronisiert werden, wird deaktiviert.
Letzte Prüfung auf abgelaufene Metadaten: vor 0:32:46 am Sa 21 Apr 2018 15:42:37 CEST.
Abhängigkeiten sind aufgelöst.
========================================================================================================
 Paket                 Arch                  Version                        Paketquelle           Größe
========================================================================================================
Installieren:
 ranger                noarch                1.7.2-7.fc27                   fedora                330 k

Transaktionsübersicht
========================================================================================================
Installieren  1 Paket

Gesamte Downloadgröße: 330 k
Installationsgröße: 1.4 M
Ist dies in Ordnung? [j/N]:y
Pakete werden heruntergeladen:
ranger-1.7.2-7.fc27.noarch.rpm                                          1.1 MB/s | 330 kB     00:00    
--------------------------------------------------------------------------------------------------------
Gesamt                                                                  315 kB/s | 330 kB     00:01     
Transaktionsüberprüfung wird ausgeführt
Transaktionsprüfung war erfolgreich.
Transaktion wird getestet
Transaktionstest war erfolgreich.
Transaktion wird ausgeführt
  Vorbereitung läuft    :                                                                           1/1 
  Installieren          : ranger-1.7.2-7.fc27.noarch                                                1/1 
  Ausgeführtes Scriptlet: ranger-1.7.2-7.fc27.noarch                                                1/1 
Running as unit: run-ra1bd6358c60f481b9aa5adbccd0a25d7.service
  Überprüfung läuft     : ranger-1.7.2-7.fc27.noarch                                                1/1 

Installiert:
  ranger.noarch 1.7.2-7.fc27                                                                            

Fertig.
```
What are your favorite Gulp plugins for CSS?
Tags: discuss, css, webdev
Published: 2018-04-21 14:06:08

---
title: What are your favorite Gulp plugins for CSS?
published: true
description: I am about to write a new blog post and I wanted to make a research about Gulp plugins for CSS. What are your favorites? 
tags: 
- discuss
- css
- webdev
---

I am about to write a new blog post and I wanted to make a research about Gulp plugins for CSS. What are your favorites?
I've just started a new job and they want me to work with technology I see as no benefit to my career, what do I do?
Tags: discuss, anonymous
Published: 2018-04-21 12:08:03

---
title: I've just started a new job and they want me to work with technology I see as no benefit to my career, what do I do?
published: true
tags: discuss, anonymous
---

_This is an anonymous post sent in by a member who does not want their name disclosed. Please be thoughtful with your responses, as these are usually tough posts to write._

My new company that has 'taken a chance' on me (which I am/was super excited about) is in the early stages of a new project with a client to provide a CMS solution for several static sites.

I was asked to evaluate some options one of which they seemed quite keen on before even talking to me, this particular option is marketed as a completely front-end agnostic solution. I set about installing it and getting the demo site up and running it was a Java solution that uses tomcat and the baked in language was some form of xml templating language. The "studio" where you have to define your content was clunky and unintuitive.

I quickly moved onto testing out something I was a bit more familiar with a CMS that provided a GraphQL API to pull your content from and a static site generator to template out the pages, I was quite proud of what I had managed to put together in the short time I had to use it and could see it being really useful for the project, a project that used a familiar framework that other developers would want to use.

So they decided to go with the other Java clunky ass unintuitive studio solution, I was told that I'd get training to use it and that I should start getting familiar with it as I'd be delivering a PoC towards the end of May.

Not wanting to sound entitled here but I really don't want to waste my time learning and antiquated technology that isn't going to help progress my career.

I'm still on probation here but feel that this isn't what I want to be doing at all.


How far do I go with this before looking for a new job?



<!-- links -->
[ben's post]: https://dev.to/ben/how-do-you-avoid-feelings-of-entitlement-401i
DS with JS
Tags: javascript, webdev, programming
Published: 2018-04-21 11:36:11

---
title: DS with JS
published: True
description: Data Structures with JavaScript — Chapter Four — Hash tables
tags: javascript, web-development, programming
---

### Data Structures with JavaScript — Chapter Four — Hash tables - 1

![https://cdn-images-1.medium.com/max/2000/1*LX7nQmZGDXrmMLNbLqTFEA.jpeg](https://cdn-images-1.medium.com/max/2000/1*LX7nQmZGDXrmMLNbLqTFEA.jpeg)

Read the full story here - https://medium.com/dev-blogs/ds-with-js-hash-table-4715c94083d2
Can (aﾠ == 1 && a == 2 && ﾠa == 3) equal true?
Tags: interviewquestions, javascript
Published: 2018-05-30 20:28:17

---
title: Can (aﾠ == 1 && a == 2 && ﾠa == 3) equal true?
published: true
tags: interview questions,javascript
canonical_url: https://www.karolisram.com/a-1-a-2-a-3/
cover_image: https://www.karolisram.com/content/images/2018/04/a-1-a2-a3.jpg
---

Here is a JavaScript trivia question. Can the expression `(aﾠ == 1 && a == 2 && ﾠa == 3)` ever evaluate to `true`? Well, today I found out it can. Run the below code and see for yourself.

{% replit repls/ProperMediocreRepo %}

Now let's look at seemingly the same code below. Try to run it. This time the expression does not evaluate to `true`. So what changed?

{% replit repls/SufficientKindSolidstatedrive %}

The difference is actally really simple and much less mysterious once you figure out what's happening. Apparently, there is a Unicode character called [Halfwidth Hangul Filler](https://www.compart.com/en/unicode/U+FFA0) which is a Korean symbol and is, for all intents and purposes, invisible. So the reason why the first code snippet evaluates to `true` is because the three variables `a` are in fact three distinct variables. One of them is prepended with halfwidth hangul filler, another one is left intact and the third one is appended with the hidden character.

Now next time someone asks you whether `(aﾠ == 1 && a == 2 && ﾠa == 3)` can ever equal to `true`, you can answer them that yes, indeed it can (with a small caveat) 😀
Things to ask an interviewer after the interview
Tags: interview, job, recruitment, newopportunity
Published: 2018-08-02 19:34:18

---
title: Things to ask an interviewer after the interview
published: true
tags: interview, job, recruitment, newopportunity
canonical_url: https://medium.com/@Varmaaditya/things-to-ask-an-interviewer-after-the-interview-3c2371d4680f
---

1. Can you tell me the day to day responsibilities for this job?
2. What do you think are the most important qualities for some one to excel in this role?
3. **What are your expectations for this role in the first 30 days and 60 days, year?**
4. Describe the culture of the company?
5. Where do you think the company is headed in the next 5 years?
6. What are the biggest opportunities facing the company/department right now?
7. What are the biggest challenges facing the company/department right now?
8. **What do you like best about working for this company?**
9. **What don’t you like about working for this company?**
10. What is the typical career path for some one in this role?
11. What are the next steps in the interview process?
12. How will you measure the success of person in this position?
13. What are some of the challenges you expect person in this position to face?
14. **Thinking back to people you’ve seen do this work previously what differentiates the ones who were good from the ones who were great?**
15. **What is the most challenging task that your team has worked on?**
Linux DNS Server (Comprehensive Guide)
Tags: linux, beginners
Published: 2018-04-21 07:23:42

---
title: Linux DNS Server (Comprehensive Guide)
published: true
description: Linux BIND server and DNS records installation & configuration
tags: #linux #beginners
---

1 The /etc/hosts File
2 Domain Names
3 Top Level Domain Names (TLDs)
4 Subdomains
5 Types of DNS Servers
6 Setting up Linux DNS Server
7 Configuring BIND
8 Defining a Primary Zone
9 Defining a Secondary Zone
10 Defining a Caching Zone
11 DNS Records Types
11.1 SOA: Start of Authority Record
11.2 NS: Name Server Records
11.3 A and AAAA: Address Records
11.4 PTR: Pointer Records
11.5 MX: Mail Exchange Records
11.6 CNAME: Canonical Name Records
11.7 TXT Records
12 DNS TTL Value
13 Catching Configuration Errors
14 Host Command
15 Whois Command
16 The rndc Command
17 Linux DNS resolver

https://likegeeks.com/linux-dns-server/

Hope you like it.
Regards,
I search people!
Tags: discuss
Published: 2018-04-21 07:14:42

---
title: I search people!
published: true
tags: discuss
---

![OP](https://thepracticaldev.s3.amazonaws.com/i/g75n8f17pjgivjmvwyzo.jpg)

I want start more communicated with people from Europe.
Because of I want up my skill in English.

Go to a friend! This is an example:

Name: Sergey
Job: I work in Aviasales.ru
My social: https://www.facebook.com/leroyse , https://twitter.com/gaserd123
Code Royale: Rust AI Coding Competition
Tags: rust, coding, programming, video
Published: 2018-04-21 06:10:52

---
title: Code Royale: Rust AI Coding Competition
published: true
description: Tackling a new, tower-defense-style, game with heuristics.
tags: rust, coding, programming, video
cover_image: https://thepracticaldev.s3.amazonaws.com/i/rmxqgqnrc8jke9hqcudc.jpg
---

In January I started to learn Rust by competing in programming challenges. This is no my second contest on the CodinGame site. In Day 1 I focus mainly on just getting out of the Wood Leagues -- a place where you are introduced to rules and build the most basic of bots.

> Follow/Subscribe to me on [Twitch to watch live](https://www.twitch.tv/mortoray) and on [Twitter to hear about broadcasts](https://twitter.com/edaqa).

Feel free to ask any questions here if you don't catch the live feed.

{% youtube mbw4s4e5wKY %}

After the break...

{% youtube 3UnKd-cZr_Q %}


> Don't forget to follow me on [Twitch](https://www.twitch.tv/mortoray) and [Twitter](https://twitter.com/edaqa).
How to set different defaults for author and committer at git
Tags: git, github, environments
Published: 2018-04-21 03:36:55

---
title: How to set different defaults for author and committer at git
published: true
description: I wanted to have a default Committer that’s different from my default Author, as I need to differentiate commits made from my local and testing environments.
tags: git, github, environments
---

> ![Me, looking for a way to set different author and committer on Google: nowhere to be found](https://thepracticaldev.s3.amazonaws.com/i/seruk4cobw387yhgyfum.jpg)
> _Me, looking for a way to set different author and committer on Google: nowhere to be found. Sad Igor was sad._

I wanted to have a default Committer that’s different from my default Author, as I need to differentiate commits made from my local and testing environments.

This is not as straight-forward as setting name/email at git, as [there are no separate configuration entries for author and committer][1]. However, it’s still possible if you [override some environment variables][2], as follows: 
Example (at your `~/.bashrc` or `~/.bash_profile`):

```bash
GIT_COMMITTER_NAME=”Deploy server”
GIT_COMMITTER_EMAIL=”deploy@server.dev”
```

------------

In case you’ve forgotten/don’t know, you can set default name/user for git commits by editing `~/.gitconfig` or running commands like these:
```bash
$ git config — global user.name “Igor Santos”
$ git config — global user.email “igor.santos@example.com”
```

[1]: https://git-scm.com/docs/git-config#git-config-useremail
[2]: https://git-scm.com/docs/git-commit-tree#_commit_information
Azure CosmosDB - Criando seu primeiro banco de dados utilizando MongoDB API
Tags: mongodb, azurecosmosdb, nosql
Published: 2018-04-21 01:20:05

---
title: Azure CosmosDB - Criando seu primeiro banco de dados utilizando MongoDB API
published: true
description: Neste post mostro como criar uma conta para o Azure CosmosDB implementando a API do MongoDB
tags: mongodb, azure cosmosdb, nosql
---

Olá pessoal, hoje dando continuidade a série sobre o uso do MongoDB no Azure CosmosDB, vou demonstrar como é simples criar uma instância com apenas alguns cliques no painel de controle da Azure. Vamos lá...

##Passo-a-passo

1. Após logar no Azure, localize no menu do lado esquerdo o item Azure CosmosDB:
    ![](https://thepracticaldev.s3.amazonaws.com/i/3ej0fst9366lh4c3r1bi.png)

2. Clique no botão adicionar no topo da tela:
    ![](https://thepracticaldev.s3.amazonaws.com/i/e2a778byimc5t2fzw6ex.png)

3. Escolha um nome para o ID da conta, note que esse nome deve ser único para o Azure como um todo. Depois escolha a API, no nosso caso MongoDB. Selecione sua assinatura, crie ou selecione um Grupo de Recurso e por fim a Localização. Nesse post não entrarei na opção de Geo-distribuição, abordarei esse recurso num outro post, por isso deixarei essa opção desabilitada. Por fim, clique no botão Criar:
    ![](https://thepracticaldev.s3.amazonaws.com/i/19tpf7612dsd3cguaigh.png)

4. Após alguns minutos a conta no CosmosDB será criada e ficará disponível na lista, para obtermos os detalhes é só clicar no nome da conta:
    ![](https://thepracticaldev.s3.amazonaws.com/i/c3o8mg7uzr051s12kyn6.png)
    ![](https://thepracticaldev.s3.amazonaws.com/i/8ogxzxnkel2nlyinizl7.png)

5. Para exibir as credenciais de acesso é só clicar em Connection String:
    ![](https://thepracticaldev.s3.amazonaws.com/i/rlxkxcuyeg0bfrohl4xc.png)
    O legal dessa opção é que o Azure CosmosDB já implementa o MongoDB com autenticação, o que é muito importante, porque nesse caso o banco estará exposto para a web. Também ele nos dá a possibilidade de credenciais Read-only, onde o usuário só poderá ler os dados. Importante ressaltar que como é o Azure CosmosDB que gerencia toda essa parte de autenticação, não é possível criar usuários ou permissões mais específicas como se estivéssemos utilizando diretamente o MongoDB.
    Para se conectar a partir de sua aplicação é só copiar o conteúdo do campo PRIMARY CONNECTION STRING e colar em sua connection string na aplicação.

Pronto, você já tem uma conta habilitada e pronta para receber seus dados.

##Próximos passos

No próximo post, vamos ver como importar os dados de uma instância MongoDB para o Azure CosmosDB e acessá-los à partir do Data Explorer da Azure e também de ferramentas de terceiros como o Robo 3T.

Espero que tenham gostado e até a próxima!