teleren/devto huggingface dataset:
Sebaris Kode Untuk Menuntaskan Masalah Hotspot Portable Xiaomi
Published: 2021-09-04 11:29:39

Menggunakan hotspot di HP adalah cara terbaik untuk sharing koneksi internet ke perangkat lain

Tapi apa jadinya jika ternyata perangkat client kita masih tidak bisa tersambung ke internet walau host hotspot bisa berselancar ria di koneksi 4G nya?

Itulah yang saya alami dengan perangkat Xiaomi saya 

Kesel dong!

Aneh saja gitu, karena ketika terkoneksi dengan laptop, HP yang saya gunakan sebagai hotspot masih bisa browsing internet dengan lancar.

Bahkan streaming Youtube.

Hanya laptop saya saja yang tidak bisa buka website apapun, padahal wifi telah tersambung dengan sinyal penuh.

Setelah didalami sambil melakukan research di internet, ternyata ada "bug" kecil yang mencegah HP saya membagikan koneksi internetnya ke perangkat lain.

Saya tidak tau apakah ini terjadi hanya pada beberapa tipe HP Xiaomi saja, yang jelas ini menjangkiti banyak user Xiaomi, dan pernah dibahas di XDA Developer Forum

Nah, bug kecil yang saya maksud adalah parameter `tether_dun_required`  pada pengaturan internal android, yang mana jika nilainya bukan 0, maka tethering tidak akan bisa dilakukan.

Oke, untuk mengetahui nilai dan memperbaiki parameter tersebut, ada beberapa step yang harus dilakukan:

1. Install Android SDK di laptop/PC
2. Aktifkan Developer Mode dan Mode USB Debugging di HP Xiaomi kalian
3. Sambungkan HP Xiaomi ke laptop/PC 
4. Buka CMD atau Command Prompt di Laptop/PC kalian, dan masukkan perintah:
`adb devices`
5. Jika tidak ada pesan error, lanjutkan dengan mengetik:
`adb shell`
`settings get global tether_dun_required`
6. Jika nilai yang keluar adalah 0, maka tidak ada masalah. Tapi, kalau bukan 0, maka lanjutkan ke step selanjutnya
7. Ketikkan kode dibawah ini pada CMD atau Command Promt tadi
`settings put global tether_dun_required 0`
8. Exit shell, lalu reboot HP Xiaomi kalian. 


Gimana, mudah kan ?
Seharusnya setelah mengganti nilai tadi, hotspot sudah bisa digunakan.

Sama seperti pada kasus yang saya alami dulu



Oke..

Saya rasa itu saja permasalahan hotspot Xiaomi yang pernah saya alami..

Untuk tau masalah hotspot Xiaomi lainnya, kalian bisa kunjungi [Artikel ini](https://www.ngelewa.com/2021/03/hp-xiaomi-tidak-bisa-hotspot-ke-laptop.html)

Semoga bagi kalian yang memiliki permasalahan sejenis, bisa menemukan solusinya

Jika kalian ada pertanyaan, silahkan share di kolom komentar di bawah ya..
7 Useful Projects on Github for Web Developers
Tags: github, webdev, 100daysofcode
Published: 2021-09-04 10:56:06

## 1. FreeCodeCamp
Build projects to earn free certificates and get experience by coding for nonprofits. 

You can learn pretty much anything related to programming. If you are type of person who tries to follow video tutorials then you can take a look their youtube channel.

[**Github**](github.com/freeCodeCamp/freeCodeCamp)
[**Youtube**](youtube.com/c/Freecodecamp)

## 2. Free Programming Books
his repository shares free programming books that you can read. It contains all kinds of topics. Definitely check that out if you are interested. (Don't forget to give it a star 😅)

[**Github**](github.com/EbookFoundation/free-programming-books)

## 3. Bootstrap
Undoubtedly the most popular HTML, CSS and JavaScript framework for developing responsive, mobile first projects on the web.

[**Github**](github.com/twbs/bootstrap)

## 4. Awesome Lists
This repository contains detailed lists around any topics. You can found out what you like or you can contribute that you think others would be interested.

[**Github**](github.com/sindresorhus/awesome)

## 5. You Don't Know JS
A series of books diving deep into the core mechanisms of the JavaScript language. The first edition of the series is now complete. You can buy it in print, or read online for free!

[**Github**](github.com/getify/You-Dont-Know-JS)

## 6. Coding Interview University
So you have big interview coming up or you just want to be prepared. Then this project covers you.


It contains links, tutorials, stories that author experienced, advices...

Definitely stop by if you have some time.

[**Github**](github.com/jwasham/coding-interview-university)

## 7. Developer Roadmap
I keep my favorite one to the last.

This repository will show you what skills or path you need to take in order to fulfill your developer path. 

Of course you do not need to complete all of them but it gives good idea what you need to do. So you can create a list and take a look at the process you made.

[**Github**](github.com/kamranahmedse/developer-roadmap)

## Helpful Links & Resources

- [freeCodeCamp](https://github.com/freeCodeCamp/freeCodeCamp)
- [Free Programming Books](https://github.com/EbookFoundation/free-programming-books)
- [Bootstrap](https://github.com/twbs/bootstrap)
- [Awesome](https://github.com/sindresorhus/awesome)
- [You-Dont-Know-JS](https://github.com/getify/You-Dont-Know-JS)
- [Coding Interview University](https://github.com/jwasham/coding-interview-university)
- [Developer roadmap - 2020](https://github.com/kamranahmedse/developer-roadmap)
- [Top 50 Projects on Github - 2020](https://www.attosol.com/top-50-projects-on-github-2020/)
Task-Force Week1 Experience
Tags: programming, awesomitylab, codeofafrica
Published: 2021-09-04 10:48:12

You can learn more on what is Task-Force [here](https://awesomity.rw/our-projects)

My first week in `Task-Force` has been awesome. I had an opportunity to work in an amazing team and learned some technical and professional skills as a software developer.

**Part I : Technical Skills**

- **User stories**

Speaking of technical skills, during the first week I learned that creating **user stories** is an essential part in software development. 

The purpose of a user story is to articulate how a piece of work will deliver a particular value back to the end-user.

- **Code optimization**

Code optimization is any method of code modification to improve code quality and efficiency.

![] (https://res.cloudinary.com/amanis/image/upload/v1630749223/Public/clement-helardot-95YRwf6CNw8-unsplash_jodram.jpg)

It's something software developers must know so that they are able to create high quality and efficient applications. This was my key takeaway during the first days of the week.

**Part II: Professional Skills**

- **Communication**

Software development is not only about having the technical skills but also you are required to have good communication skills.

Nowadays software developers are working in teams. Working in teams means you have to communicate to each-other so that you deliver well.

if you don't have good communication skills, you will end up not delivering not because of your technical skills but your communication ones.

- **Presentation**

![] (https://res.cloudinary.com/amanis/image/upload/v1630748981/Public/leon-Oalh2MojUuk-unsplash_usgord.jpg)
During the first week in Task-Force I was equipped with presentation skills that can not only help me as a software developer but also as a person in general.

As a software developer you must be able to present your work. 

As a conclusion I can say that I've learned many things during the first week but these are the main key takeaways.


<pre>console.log("I'm so excited to see what the next weeks will bring");</pre>

> There is more to software development than writing codes
Rearranging application instances in Passenger.
Published: 2021-09-04 10:12:47

*Problem:* We had three internal rails applications running in one physical serve. During some of the deployments, one of the applications was not booting up. Though occurrence of such an event was very low I looked into the issue as it stimulated me.

We had a master passenger.conf and each application had their own application.conf, which looked something like this:

Master

```
PassengerRoot /usr/local/rvm/gems/ruby-2.6.0/gems/passenger-6.0.2
PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.6.0/wrappers/ruby
PassengerMaxPoolSize 18
PassengerPoolIdleTime 300
```

Application specific configs

```
PassengerAppEnv qa
PassengerRuby /usr/local/rvm/gems/gemset/wrappers/ruby
PassengerMinInstances 9
PassengerPreStart http://localhost:81/
```

If we carefully look at the `PassengerMaxPoolSize` and `PassengerMinInstances` for three applications, they didn't add up. Forget request load balancing, passenger didn't even have space for booting the application because Max was set to 18 and each application's min was 9. This meant, at any given time there could be only two applications running.

Fortunately, that wasn't the case. The deployment sequence decided the number of instances of each application that will occupy the 18 available slots. If all the three were deployed simultaneously then each occupied x,y,z number of instances based on the application's booting time.

Some of the examples of numbers were:

x | y | z
- | - | -
6 | 9 | 3
9 | 5 | 4
9 | 9 | 0

*Solution:* We had to change `PassengerMinInstances` to a number that was suitable for the application. It was also made sure that passenger get a couple of free instances for [Request load balancing](https://www.phusionpassenger.com/library/indepth/ruby/request_load_balancing.html).
Installing MariaDB inside a container
Published: 2021-09-04 10:07:46

We had a requirement of installing MariaDB to an existing docker image because the test cases had to run within the same image and the rails framework needs a test database to run the tests.

After installing the MariaDB using yum, we tried to start the sql server within the container, it threw

```shell
ERROR 2002 (HY000): Cant connect to local MySQL server through socket /var/lib/mysql/mysql.sock
```

Excerpts of step from the [article](https://dba.stackexchange.com/questions/185498/centos-container-installing-mariadb-server):


start the service manually and
ensure that you have started it such that it will stay in the foreground (because a Docker container exits when the foreground process exits or puts itself into the background).
Inside a docker container, nothing will run by default. The following code when executed within the container will start the server.

```shell
/usr/libexec/mariadb-prepare-db-dir mariadb.service 

/usr/bin/mysqld_safe --basedir=/usr & 
```

We added these lines to our Dockerfile and every time sql-server was started during the boot up.
I Build This Simple Youtube Repeater for You
Tags: showdev
Published: 2021-09-04 10:06:28

**tl;dr** Check the Youtube Repeater at [mini.hadna.space](https://mini.hadna.space/youtube-repeater)

As the title says, this mini-product will help you to repeat a single Youtube video for you over and over. All you need to do is copy the video URL and paste it into this page, and this mini-product will do the rest for you!

**Why I build this?**

I sometime like to listen to a single music, based on my current mood. There are some alternatives to play repeatedly, but most of them are browser extension (desktop browser) which do not meet my requirements.

So, what if I want to play on my mobile device, let's say, in a night camp beside the bonfire with my son? ⛺

With my Youtube Repeater, you do not need to install anything. Just open your browser, paste your favourite Youtube video URL, and enjoy!

**An important note for mobile device users**

Due to limitations/restrictions on mobile device, your song would be stopped if you minimize the browser. If you are using mobile device, please keep your browser open and do not lock your screen.

Alternatively, you can use Brave browser, which I also use, and go to Settings → Enable "Background Video Playback", then request Desktop Site, and proceed to enter the YouTube video URL.

Have fun, and I hope you have an enjoyable experience!
What is Throttling and Debouncing in JavaScript and how it works?
Tags: javascript
Published: 2021-09-04 09:54:51

Event Listeners help us in binding functions which are called when that event is emitted, like scrolling or resizing.

But what if the event is called multiple times in a very short span of time? If the function called by the listener is intensive, it can severely impact performance.

Debouncing and Throttling are really useful under such scenarios.

#Throttling

Imagine yourself as a 7-year-old toddler who loves to eat chocolate cake! Today your mom has made one, but it's not for you, it's for the guests! You, being spunky, keep on asking her for the cake. Finally, she gives you the cake. But, you keep on asking her for more. Annoyed, she agrees to give you more cake with a condition that you can have the cake only after an hour. Still, you keep on asking her for the cake, but now she ignores you. Finally, after an interval of one hour, you get more cake. If you ask for more, you will get it only after an hour, no matter how many times you ask her.

This is what throttling is!

**Throttling is a technique in which, no matter how many times the user fires the event, the attached function will be executed only once in a given time interval.**

For instance, when a user clicks on a button, a helloWorld function is executed which prints Hello, world on the console. Now, when throttling is applied with 1000 milliseconds to this helloWorld function, no matter how many times the user clicks on the button, Hello, world will be printed only once in 1000 milliseconds. Throttling ensures that the function executes at a regular interval.

```
$("body").on('scroll', _.throttle(function() {
  // Do expensive things
}, 100));
```

#Debouncing

Debouncing is delaying a certain execution to accomodate all changes before executing the final function.

It’s very similar to throttle except the time delay is refreshed every time the event is triggered.

Suppose the time delay provided is 500 milliseconds, and the event is triggered for 3 seconds, the function will only run once after 3.5 seconds.

Again the important part here is that you’re not guaranteed that the function will trigger at least once in the given delay time instead the delay time gets updated every time the function is called.

This is particularly useful in cases where the **function needs to be fired only once for the final output and previous calls can be ignored in case of continuous triggers.**

One example would be search input triggers. If you’re binding to the change event of the input to update the results, it is usually not preferred to send API calls for every letter that is typed. If we are rather waiting for 2 seconds before ensuring that there are no further changes from the user before sending the final request, it will significantly reduce the amount of API calls made.

```
$(window).on('resize', _.debounce(function() {
  // Do expensive things
}, 100));
```


Hope this helps! Throttle up!

Enjoyed this article?
increase wordpress upload limit up to 1000GB
Tags: wordpress
Published: 2021-09-04 09:34:33

Hi guys, Today we will see how to increase wordpress upload limit up to 1000GB.

In wordpress, by default wordpress sets some limit for uploading. If we cross that limit, wordpress will not allow to upload. 

For website development purpose, that limit is not at all efficient. So to solve that issue, I developed a Increase Upload Limit Plugin.

Using this Plugin, you can able to increase the upload limit to a huge value, up to 1000GB with only one click. And this Plugin is available for absolutely LIFETIME Free of Cost.

From now on, you need not to worry about that issue, as plugin is resolving that issue.

You can download plugin from <a href="https://wordpress.org/plugins/increase-upload-limit/" target="_blank">here</a>

Thanks for taking your valuable time for reading my post, if you have any queries , please leave a comment and will respond. If you find this post useful, please share it. 

Social Profile : <a href="https://www.linkedin.com/in/pavan-kumar-sadhu-47693818b/">LinkedIn</a>

Have a Nice Day!
Hooks in React
Tags: react, javascript, webdev
Published: 2021-09-04 09:31:25

Hooks are a new feature introduced in React 16.8 and available in later versions. We can use state and other features of react by using hooks. React has two ways of creating component, one is using class and other is using function.

using class to generate component needs to add react boiler-plate code because of that using function for generating component is introduced. to use state like features of react in later way hooks are useful.

There are certain hooks that react provide us. useState, useEffect, useRef and useReducer. but we can create custom hooks as per our requirements.

##useState:
as name suggests it used to handle state of component. It helps to manage state between component re-renders.

lets look at example below,
we have one button "Click Me", on clicking that button text should be changed to **"title changed"**

```
export default function App() {
  let title = "Initial header";
  const handleClick = () => {
    title = "title changed";
    console.log(title);
  }
  return (
    <div className="App">
      <h1>{title}</h1>
      <button onClick={handleClick}>Click Me</button>

    </div>
  );
}
```
![without_usestate](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0c73ymtl7jvjzts7xc6a.gif)

as we can see, when button is clicked the title value is changed in console, but on browser it shows old value, to update value component needs to re-render and between that rendering process we also need to maintain updated state. This thing can be achieved using **useState**

```
import { useState } from "react";

export default function App() {
  const [title, setTitle] = useState("Initial header");
  const handleClick = () => {
    setTitle("title changed");
  };
  return (
    <div className="App">
      <h1>{title}</h1>
      <button onClick={handleClick}>Click Me</button>
    </div>
  );
}
```
![with_usestate](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bboj7tv3117s154scano.gif)


##useEffect:
useEffect hook is used to handle activities when component renders . There is some syntax variation is used to customize useEffect.
```
//executes at component's initial render
  useEffect(()=> {

  }, []);

//executes at component's state title is changed.
  useEffect(()=> {

  }, title);

//executes at component's renders
  useEffect(()=> {

  });
``` 
![useEffect](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b6xok1m8sfbctc2ehh24.gif)
Write a program in python, to create a game, which return the number which is left in your mind?
Tags: python, java
Published: 2021-09-04 09:20:33

## Algorithm of this Game is: 

1.First think any number between the range give by the computer.
2.Take second number as same as first number from your friend.
3.Take the third number given by the computer.
4.Add all the numbers.
5.Then half the number after adding.
6.Return the number which you taken from your friend.
7.Now the some number is remaining in your mind, that number is display by the computer. 

##Explanation: 

1.Open python or any python IDE like Pycharm, Visual studio Code etc.
2.Create a file by .py extension.
3.Then import time and random module.
4.Display some message like choose any number between 1-20 etc.
5.Assign a variable, where you store the random number which the computer give this number to the player.
6.Last you have do that divide the variable by 2, and that number is the number which is remaining in the mind of the player.


You can see the video on YouTube the link is : https://youtu.be/_fiA23AREXU

Source code of this game is on my GitHub you can check out:
https://github.com/satyam41/YouTube.git
Why linux is better for Developers
Tags: linux
Published: 2021-09-04 08:51:58

## Why Linux is better for Developers

Linux - a open source and free to use softwere, as a developer we ca see the code and make changes and try it our own.

## Why use Linux

in linux to can do any things using command line tool (terminal). you can install any things using terminal command using apt package manager
```js
sudo apt install yourFileName
```
### Every time you use terminal
in linux you should use terminal all the time and it's sound like scary but it is not,

when you use terminal you have more control and accessible, long story short you have all the power, that things i most loved in lunix

### If you don't know terminal command then

it is ok to not know the command, when you don't know how to write command and how to use terminal then its sound like very danger but it not belive me, using terminal is very easy and a good felling


## basic of Linux command 

you don't need to master teminal if you use linux ther are some command ,

- cd  - stand for chagne directory

- ls - stand for list
- pwd - stand for priend working directory
- touch - stand for making any file using touch command 
- mkdir - stand for making any for folder (make directory)
- cat - stand for concat but you can use thing command for showing file


this command is most use when you terminal

### Props of linux

there are some props of using Lunix,
- you can customize you lunix any operating system like masOS or windows,
- you have all the power
- if you pc is low end then Lunix runing your pc faster
- using lunix you pc runfast
- if you want to exprence Macos the try Lunix 

### cons

- nothing 

<hr>
# overall Linux
- you can use Lunix (free)
- you are the king of you pc when you use Lunix
- Linux is faster then windows
- Linux is made for developers 
- Linux feel like masos
Twitter OGP Testing with your localhost
Tags: frontend, ogp, twitter, webdev
Published: 2021-09-04 08:48:46

## Process

Please watch the video 🎥 (The video starts at the step no.2)

Steps are followings,
1. Download "Localhost OGP Checker" chrome extension
2. Open your localhost page that you want to test OGP
3. Run "Localhost OGP Checker" and a page will show up on as a new tab
4. Copy the URL
5. Paste the URL to the Card Validator
6. See the preview 😉

## Tools & Site

- [Localhost OGP チェッカー - Chrome ウェブストア](https://chrome.google.com/webstore/detail/localhost-open-graph-chec/gcbnmkhkglonipggglncobhklaegphgn?hl=ja)

Chrome extension to check the operation of OGP tags for HTML files in localhost
Temporarily hosts the head tag of the relevant file.

- [Card Validator | Twitter Developers](https://cards-dev.twitter.com/validator)

Preview the OGP of given URL
Best chrome extension for a web developer
Tags: choosetochallenge, codequality, devops
Published: 2021-09-04 08:44:34

Hey Everyone 🤗
Did you code today❓
.
Today I'm sharing you the list of 6 must-have chrome extension for a web developer which will help developers to work easily during development🔥💯
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l5e4zdpsdna50aqszqgi.png)

1. ColorZilla :-https://chrome.google.com/webstore/detail/colorzilla/bhlhnicpbhignbdhedgjhgdocnmhomnp?hl=en
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ox9c3b0cszodh3cvrun2.png)

2. WhatFont :- https://chrome.google.com/webstore/detail/whatfont/jabopobgcpjmedljpbcaablpmlmfcogm?hl=en
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f0a0me2c4hcox2vjp22w.png)

3. Clear Cache :- https://chrome.google.com/webstore/detail/clear-cache/cppjkneekbjaeellbfkmgnhonkkjfpdn?hl=en
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x1tdb4o1cm3esce7k4r6.png)

4. GoFullPage - Full Page Screen Capture :- https://chrome.google.com/webstore/detail/gofullpage-full-page-scre/fdpohaocaechififmbbbbbknoalclacl?hl=en
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jfh6cvm5lcpb88onmqyk.png)

5. JSONView :- https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc?hl=en
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x14j2frlwsiypd9mljmr.png)

6. Check My Links :- https://chrome.google.com/webstore/detail/check-my-links/ojkcdipcgfaekbeaelaapakgnjflfglf
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lr7jf4c3u71v3w3hk5n0.png)

Hope you'll find it useful, if you do comment below👇
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lu4jdn9176377pm1lnfl.png)

If you have any doubts you can DM me😊

Follow for more @niteshtaliyan  💪
website - https://www.niteshtaliyan.tech
instagram - https://www.instagram.com/nitesh_taliyan
LinkedIn - https://www.linkedin.com/in/niteshtaliyan