teleren/devto huggingface dataset:
How to create a simple react native app that will fetch data from a music notes website and display it on the app?
Tags: react, reactnative, javascript, wwebdev
Published: 2019-12-11 09:53:04

I'm trying to create a simple react native  app that will fetch musical notes from a website for songs and display it on the app.
I have basic knowledge of HTML,CSS, Javascript ..
But I don't know where to begin now.
I found that you need to an API to fetch data...but that website doesn't have an API .
Can you guys help me with what I should be doing and how to proceed.
I'm doing this as my personal project.
The website link : http://www.keylessonline.com/list/tamil

So basically , I want the list of the songs to display on the app and user should be able to search for a song and given the link to view the notes .

Reddit post for the same.
https://redd.it/e94wd3
Does your favorite language X
Tags: functional
Published: 2019-12-11 09:29:33

- has support for a repl?
- can represent two types in one without too much hassle i.e sum type, union type?
- has no null pointer exception?
- can statically infer types?
- has operator overloading?
- can do recursion without blowing the stack?

If you nodded yes to all those questions then congratulations, you should keep using it.

If not, maybe you should take a look at [reasonml](https://reasonml.github.io/) which is an ocaml alternative syntax that mimics javascript language. You could also try its closer cousin [F#](https://fsharp.org/) which fixes some of the warts which you may encounter in ocaml/reasonml (using ./ for float division, tooling, etc).

The best way to learn a new language IMHO is to use it for solving a problem. [Advent of code 2019](https://adventofcode.com/2019) is publishing a new puzzle every day in December which you can solve in any language. I am currently using this opportunity to learn F# and so can you 😀.
Reading Snippets [6]
Tags: javascript, beginners
Published: 2019-12-11 09:09:23

Non-boolean values are converted to "Truthy" and "Falsy" when placed in comparison operators. 

True, all numbers except 0, non empty strings, and everything else may be considered truthy. 

False, empty strings, 0 or NAN, and null or undefined may be considered as falsey.
★ 📺 Video: Using tags and segments in Mailcoach
Tags: laravel, php, mailcoach
Published: 2020-01-02 23:45:50

---
title: ★ 📺 Video: Using tags and segments in Mailcoach
published: true
date: 2019-12-11 09:08:56 UTC
tags: laravel, php, mailcoach
canonical_url: https://freek.dev/1526-video-using-tags-and-segments-in-mailcoach
---

My team and I are currently building [Mailcoach](https://mailcoach.app), a self-hosted solution to easily send out newsletters and email campaigns. In this video, I demonstrate how email lists can be segmented using tags.

{% youtube mAmw0sjFjt0 %}

Together with Mailcoach, we'll release a video course on how to use Mailcoach, and how it was built. We'll also include some videos on how to write clean, maintainable code. There will be something to learn for everyone, whether you're starting with Laravel, or you already have some years of experience under your belt.

Mailcoach and the video course will launch early 2020, sign up for the email list at [https://mailcoach.app](https://mailcoach.app) to get notified.
Day 11 of the Visual Studio Tips Advent Calendar is now live
Tags: visualstudio
Published: 2019-12-11 08:03:08

Day 11 of the Visual Studio Tips Advent Calendar is now live. Enjoy! 

What will it be today I wonder?

https://visualstudiotips.co.uk/calendar/

#VisualStudio #DevDecember #VsTipsAdvent #Advent
Client Server Pattern
Tags: design, beginners, todayilearned
Published: 2019-12-11 07:52:40

__This pattern consists of two parties; a server and multiple clients.
The server component will provide services to multiple client components__

Clients request services from the server and the server provides relevant services to those clients.

#Two - Tier Client/Server Structure#

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/q7whc0bk3znn7jznukq3.png)


A two-tier architecture is where a client talks directly to a server, with no intervening server. It is typically used in small environments


#Three tier architectures#

 In the three tier architecture, a middleware is used between the user system interface client environment and the database management server environment.

The widespread use of the term 3-tier architecture also denotes the following architectures:

• Application sharing between a client, middleware and enterprise server.

  Divide middleware products into two categories:

○ __Primitive middleware__– The middleware layer that is able to tie together many different systems to create a single logical system, a virtual system.

○ __Database-oriented middleware__ – It uses a primitive middleware to more information to and from a database.

• Application sharing between a client, application server and enterprise database server.


![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/q25irf6icxan5m5qjvfc.png)


__Presentation layer__
Supports the GUI. Sometimes this is called a GUI-lite application. There may be many different kinds of GUI.

__Application logic__
Includes all function and procedures that make the application an application for a particular domain. 

__Database__
 A large computational server could act as a mathematical engine.




__Resoruces__ 

<http://infolab.stanford.edu/~burback/dadl/node107.html> 

<https://towardsdatascience.com/10-common-software-architectural-patterns-in-a-nutshell-a0b47a1e9013>
Breakfast Then Code
Tags: beginners, codenewbie, java, 100daysofcode
Published: 2019-12-11 07:42:50

I've been coding for 60 days straight now. I hit a bump about 40 days in when I struggled really hard to continue, Mainly it was due to not knowing how to practice, but switching courses really helped. Hitting that bump helped me learn how to practice, even if no exercises are provided.

During this time coding I've also hit a point where I don't spend my spare time doing anything else but trying to learn. Granted, it's not always a lot of time, but there are definitely days where I will spend 4 -5 hours coding, when I have that much time available.

Coding has definitely become a habit. It's one of those things now where I dont feel <em>right</em> if I miss a day. I find myself thinking about programming even when I'm not, or looking at tweeter and reading other people's programming - related stuff, or reading on here.

I tried to play a game today for the first time in 2 months, Black Mesa. If you like PC games, check it out on Steam. Anyway, I couldn't play for more than ten minutes before I had to stop. I have this drive to not waste time, and it feels somehow wrong to spend that precious time doing something else.

My original title asked the question: "Hyperfocus, or Obsession?", but I really don't know the answer. I've always had this ability to hyperfocus on something, to drive forward and solve a problem even if it means staying up late. I guess I don't know if it's that, or obsession. Does it matter?

I do know that learning to program has somehow taken over my waking life, and outside of breakfast is the first thing I think about when I get up in the morning. 

If only code were food.
What I Learned From Developing Arabic OCR Android App
Tags: android, java
Published: 2019-12-11 07:14:29

---
title: What I Learned From Developing Arabic OCR Android App
published: true
description: lessons I learned from developing OCR app for Arabic text on images.
cover: https://thepracticaldev.s3.amazonaws.com/i/4fiat3eo37gxf9wcijbm.jpg
tags: android, java
---

I searched for an app to extract text on images for Arabic language. I couldn't find any app without Internet access for Android platform. but after somedays of searching I found two apps.. but the OCR accuracy is horrible!

I decided to create [Arabic OCR App for Android](https://play.google.com/store/apps/details?id=com.softwarepharaoh.img2txt). I started a year ago, Oct 6, 2018. It was a great yet sad decision. I faced too many challenges.

There is a use for JNI for Android which is hard to write and deal with for me. So I need to familiarize myself with developing in CPP with Java using JNI. Then I faced the other obstacle which is the bad accuracy of trained models for identifying Arabic languages for tesseract OCR library.

I searched for tesseract 4.0 library for Android, and LSTM trained data with the highest accuracy. After too many iterations and failures for one loooooong year, I succeed!

Finally, I managed to make the OCR app accurate, works offline, and easy to use. You can use it! it's [here](https://play.google.com/store/apps/details?id=com.softwarepharaoh.img2txt).

I learned that developing software is __iterative process__ not an overnight success.. __researching is your first step__ and don't stuck in experimenting without research.. __use libraries__, and don't reinvent the bicycle (stand on the shoulders of giants).

If you have any suggestions or advices, tell me in the comments. Thanks.
Set a callback to setState(useState) in React funtional Component
Tags: react, functional, javascript, redux
Published: 2019-12-11 07:06:02

It is hard sometime to call something after updating the state using useState hook in functional component in React.

Here is a simple trick: 

1. Define State using UseState

```
const [filterObj, setFilterObj] = useState({});
```

2. Set State first

```
 // when props updates please update the state.
  useEffect(() => {
      setFilterObj({ ...props.something});
  }, [props.something]);
```

3. UseEffect to call the function which you want to call after the setState.

```
 // on state change call this event
  useEffect(() => {
    fetchData(currentPage); // this is a fuction which calls api
  }, [filterObj]) 
```
Lua chon hoc lai xe o to o dau tot
Published: 2019-12-11 06:54:28

Việc tìm kiếm một trung tâm uy tín để theo học khóa dạy lái xe chất lượng tuy không khó nhưng bạn cũng phải lựa chọn thật kỹ càng.
Thành Công có các giáo viên hướng dẫn với nhiều năm kinh nghiệm sẽ giúp cho mọi người nắm được những lý thuyết căn bản khi chạy xe, cách lái xe an toàn và đúng cách nhất.
Bạn có thể tham khảo các khóa học tại đây: https://hoclaixethanhcong.vn/
> https://hoclaixethanhcong.vn/hoc-bang-lai-xe-o-to-hang-b1.html
> https://hoclaixethanhcong.vn/dao-tao-hoc-lai-xe-o-to-hang-b2.html
> https://hoclaixethanhcong.vn/dao-tao-hoc-lai-xe-hang-c.html

Nếu vẫn chưa tìm được trung tâm ưng ý, bạn có thể tìm thêm thông tin của Thành Công tại hệ thống profile:
> https://buddypress.org/members/thanhcong/profile/
> https://www.instapaper.com/p/thanhcong
> https://vn.wantedly.com/users/125159680
Advent of Code 2019 Solution Megathread - Day 11: Space Police
Tags: adventofcode, challenge, adventofcode2019, spoilers
Published: 2019-12-11 06:50:54

---
title: Advent of Code 2019 Solution Megathread - Day 11: Space Police
published: True
description: Cheese it! It's the fuzz!
tags: adventofcode,challenge, adventofcode2019, spoilers
series: Advent of Code 2019 Solutions
cover_image: https://i.imgur.com/GDcKeGl.png
---

IntCode's back, but his brain is inside the robot now.

### [Day 11 - The Problem](https://adventofcode.com/2019/day/11)
Oh no! The police have pulled us over! Apparently, not properly displaying registration markings is a bookable offense. Luckily, we are able to get our registration from the control-room elves. We just need our hull painting robot to take the code and paint our mark. We _do_ have a hull painting robot, don't we?

Part 1 has us building an IntCode interpreter powered robot. We need to send the interpreter input (the color of the hull where it's standing) and use the output to move the robot and paint the hull.

Unfortunately, the simulation goes awry, and the robot paints a deliriously beautiful but meaningless picture.  Worse, it's not a registration mark.  We re-calibrate our starting color, and successfully. generate our registration code to complete Part 2.

### Ongoing Meta

#### Dev.to List of Leaderboards

* `120635-5c140b9a` - provided by [Linda Thompson](https://dev.to/lindakatcodes) 

 If you were part of [Ryan Palo](https://dev.to/rpalo)'s leaderboard last year, you're still a member of that! 

If you want me to add your leaderboard code to this page, reply to one of these posts and/or send me a DM containing your  code and any theming or notes you’d like me to add. (You can find your private leaderboard code on your "[Private Leaderboard](https://adventofcode.com/2019/leaderboard/private)" page.)

I'll edit in any leaderboards that people want to post, along with any description for the kinds of people you want to have on it. (My leaderboard is being used as my office's leaderboard.) And if I get something wrong, please call me out or message me and I’ll fix it ASAP.

There's no limit to the number of leaderboards you can join, so there's no problem belonging to a "Beginner" *and* a language specific one if you want.

#### Neat Statistics

I'm planning on adding some statistics, but other than "what languages did we see yesterday" does anyone have any ideas?

##### Languages Seen On Day 10

* JavaScript x 2
* Python x 2
* Kotlin
* Swift


##### Completion Stats

By applying a best-fit descending power trend-line to the 1 and 2 star  columns on the [stats page](https://adventofcode.com/2019/stats), my estimates predict:

2 stars on day 25: 6358 people

1 star on day 25: 420 people. <sub>_Nice_</sub>

If you're still going, take heart in that you are in a _rapidly_ dwindling pool of people.

Doing other questionable statistics gives me: 415/6248
How to Test my database layer code in nodejs?
Tags: discuss, testing, node, help
Published: 2019-12-11 06:50:36

I am looking to write unit and/or integration tests for one of the projects that I work on. I connect to mongo and postgres(using plain drivers, no ORM frameworks on top like mongoose or knex). I use express for web services.
- `I don't use any kind of ORM`

So, now that I have my stack explained, I would like some suggestions on how to implement the unit tests.

I have written unit & integration tests in java quite some time back but I have no experience for the same in node.js. I used to have a mock data feed which is used to mimic the database. It uses the `h2` database(an in memory database which is created along with tests and dies after the test cycle,  magically!!).

Now, I am not sure if I can do something similar in node.js. I do want to have an approach like this because, I write my own raw sql queries. Right now, there is no plan to move it to an ORM as we have lot of custom logic that happens inside. So, is there a way or someone has implemented something similar in typescript?

Suggestions Requested
Hoc lai xe o to o dau chat luong
Published: 2019-12-11 06:38:38

Việc tìm kiếm một trung tâm uy tín để theo học khóa dạy lái xe chất lượng tuy không khó nhưng bạn cũng phải lựa chọn thật kỹ càng.
Thành Công có các giáo viên hướng dẫn với nhiều năm kinh nghiệm sẽ giúp cho mọi người nắm được những lý thuyết căn bản khi chạy xe, cách lái xe an toàn và đúng cách nhất.
Bạn có thể tham khảo các khóa học tại đây: https://hoclaixethanhcong.vn/
> https://hoclaixethanhcong.vn/hoc-bang-lai-xe-o-to-hang-b1.html
> https://hoclaixethanhcong.vn/dao-tao-hoc-lai-xe-o-to-hang-b2.html
> https://hoclaixethanhcong.vn/dao-tao-hoc-lai-xe-hang-c.html

Nếu vẫn chưa tìm được trung tâm ưng ý, bạn có thể tìm thêm thông tin của Thành Công tại hệ thống profile:
> https://buddypress.org/members/thanhcong/profile/
> https://www.instapaper.com/p/thanhcong
> https://vn.wantedly.com/users/125159680
Charming the Python: Loops
Tags: python, beginners
Published: 2019-12-10 21:17:47

*If coding tutorials with math examples are the bane of your existence, keep reading. This series uses relatable examples like dogs and cats.*

---
## Loops


Loops are meant to do repetitive things. Any time you see something that needs to be repeated, you should probably be using some sort of loop. For example, when washing dishes, you wet the dish, scrub it with soap, rinse the dish, dry the dish. Then you do this over and over until the dishes are done.

### While loop
A while loop is used to execute a block of statements repeatedly `while` a given condition is satisfied

```python
count = 0
while count < 5:
    print(count)  # prints the current count
    count = count + 1  # adds 1 to count each time
```
### For loop
For loops are meant to iterate over a sequence, such as a list, a tuple, a dictionary, a set, or a string.
```python
pets = ['Puppy', "Cheeto", 'Remmy', 'Wiley', "Ruger", "Stick"]

for pet in pets:  # create new variable `pet`
    feed_pet  # feed each pet in list(pets)
    print(pet + " is fed")  # print a line about pet being fed
else:
    print('no more pets to feed')  # when no more pet in list(pets) print about that
```

For those who like a bit of math:
```python
numbers = (0,1,2,4,5)
for number in numbers:
    print(number)
0
1
2
4
5
```
### Break and Continue
`break` is used for getting out or stopping the loop

For example, the below `while` loop prints 0, 1, 2, but when it reaches 3 it stops
```python
count = 0
while count < 5:
    print(count)  # prints the current count
    count = count + 1  # adds 1 to count each time
    if count == 3:
        break
```

`continue` is used to stop the current iteration and move to the next one.

For example, the below `while` loop only prints 0, 1, 2,4 but skips 3.
```python
count = 0
while count < 5:
    if count == 3:
        continue
    print(count)
    count = count + 1
```

Example `for` loop `continue`
```python
pets = ['Puppy', "Cheeto", 'Remmy', 'Wiley', "Ruger", "Stick"]

for pet in pets:
    if pet == 'Stick'
	    continue  # skip feeding Stick and move on
	feed_pet
    print(pet + " is fed")
else:
    print('no more pets to feed')  # when no more pet in list(pets) print about that
```

### Pass
`pass` is basically used to say "hey, I'm still working on this and I just haven't filled in the codestuffs yet."
`pass` is used to bypass errors from incomplete code.
```python
for pet in pets:
    pass
```

---
Series based on {% post https://dev.to/asabeneh/30daysofpyton-challenge-43ii %}
Hi, I'm Shahzaib from Pakistan..
Tags: introductions, askmeanything
Published: 2019-12-11 06:21:24

This is my first post so I will be introducing myself as a custom. Here we go. My name is Muhammad Shahzaib, born in Karachi, Pakistan.

Right now Iam 19 years old and a Full Stack Developer with Cloud Native experience. When I was of about 14 I started learning Adobe Photoshop and from there dive in to Web and Mobile Development.

I mostly program in JavaScript and Python.
React and React-Native are my favourite .
Always stucked between GCP and AWS .
I am currently learning AI (machine learning & deep learning) and ChatBots.

that's it

###ASK ME ANYTHING
See you on the next post.
Thanks Alot.
Building a PC - What not to do.
Tags: pcbuilding
Published: 2019-12-11 05:53:57

---
title: Building a PC - What not to do.
published: true
description: I just bought a pc for in parts for myself and made some mistakes putting it together. Here's where I went wrong: A case study. 
tags: #PCBuilding
---

So my birthday is around the corner...I guess I'm still justifying the purchase but I bought a PC like 5 days ago, but on the cheap because it came in pieces. More like there was a sale on PC parts on Amazon and my buddy made a pc so remembering all the days as a kid pining for a wicked fast thread-ripping gaming pc I bought a bunch of pieces for my first ever battlestation. Now running windows 7 because I had it...My most recent mistake I will say. It had no opportunity costs though. I had an unopened ultimate version sitting on a shelf.... I wonder why XD... 

Anyway. I made some other mistakes along the way so here we gooOoooOOOO!!

####BULLET LIST OF WHAT NOT TO DO:

1.Don't trust Amazon shipping times. Be patient or buy it elsewhere if it's not too expensive.

2.Read a bit about putting together a PC before you put it together.

3.Doublecheck compatibility on site like [this](https://pcpartpicker.com/list/)

4.Spend time clearing a space to work in.

5.Move all animals to other spaces.

6.Read the basic info about your Motherboard and follow all instructions included. 

7.Fuck it you know what just lay all the different instructions that come in each part box out and double check the specifics for each part. 
-each part most likely comes with a generic set-of-instructions-for-installation specific to other compatible parts (think power supply instructions) lay them all out next to each other and look for the instructions specific to the parts you have. This way you'll be certain your connections and installation is correct if issues arise elsewhere.

8.When you get uncharacteristically angry after you didn't lock down your cpu before realizing you would have to take out your motherboard to install the aftermarket heatsink for your cpu and end up dropping your cpu on the ground and bend some pins and get lint in it, eat some food, you're really hungry.

9.Put the CPU in first the right time.

10.read I/O installation instructions carefully multiple times. Get it right the first time because it's how you turn the damn thing on most likely. It's a bitch when you don't know what else could be the issue.

11. Be careful with your ATX connections. You can ruin it all real quick. Kind of like dropping a CPU.

12.Take your damn time. 

These became suggestions but yeah I dropped my cpu, didn't connect my I/O properly, and had issues connecting the right cpu power. It all worked out in the end but Be careful. This shits expensive. 

Till next time!
Day 17 - Project -NYT Article - Completed
Tags: selftaught, beginners, html, css
Published: 2019-12-11 05:48:16

I finished the NYT Article page clone.

There was a lot of content and it was the first time I handled this much content.

It was a fun exercise.

You can see a video [here](https://twitter.com/jojonwanderlust/status/1204633491947827200)

I am exhausted but I am really with how this came up and the practice of finding solution for different issues.

The streak continues ...
Your E Commerce Shopping Software
Published: 2019-12-11 05:44:30

We have ready made ECommerce website which you can check here 
https://aitiri.com/ecommerce and shop.aitiri.com

Planning to build your own ECommerce Shopping Software app for your online store, something just on the lines of Amazon or Flipkart? Aitiri has your needs sorted. With our ready-made ECommerce Shopping Software app software scale new heights with your business. Create your very own multi-vendor online shopping cart with multiple sellers, categories, and brands on board. With our superior clone script, design an app that allows buyers to buy any item from anywhere in the world.

Create an app that supports endless items, merchants, categories and properties for all your items. Our aesthetic design of the app gives you a multifunctional admin dashboard that helps control all your operations in real-time from one single portal. An app that supports all festive offers, so cash in on all the best days with exclusive offers and sales on Cyber Mondays, Black Fridays, and others with our cutting-edge Amazon/Flipkart like clone script built for both iOS and Android platforms. All your E Commerce Shopping Software vendors can now gather and sell products from one place with an app exclusively designed for you.