teleren/devto huggingface dataset:
Community Discussion Thread — DigitalOcean App Platform Hackathon on DEV
Tags: discuss, dohackathon
Published: 2020-12-10 16:59:53

---
title: Community Discussion Thread — DigitalOcean App Platform Hackathon on DEV
published: true
description: A place to discuss your progress with the DigitalOcean App Platform Hackathon on DEV — and lend encouragement to one another!
tags: discuss, dohackathon
---

### **This thread is your place to share progress with your fellow App Platform Hackathon participants and encourage one another throughout the month!**

> Feel free to share...
- Positive encouragement for other participants
- Milestones you've achieved or things you've learned throughout the hackathon
- Links to DEV posts related to your official submission (especially if you've written multiple reflections/progress posts). Reminder to take advantage of the DEV article liquid tag when sharing a link! 


Finally, if you need help throughout the DigitalOcean App Platform Hackathon on DEV, head over to the [help thread](https://dev.to/devteam/help-thread-digitalocean-app-platform-hackathon-on-dev-2l03)

#### 🌈 _Comment Below_ 🌈
Help Thread — DigitalOcean App Platform Hackathon on DEV
Tags: help, dohackathon
Published: 2020-12-10 16:59:30

---
title: Help Thread — DigitalOcean App Platform Hackathon on DEV
published: true
description: A place to share any questions or issues related to your hackathon experience. DigitalOcean team members will be checking this thread regularly to help folks out!
tags: help, dohackathon
---

The DigitalOcean team will be making themselves available to help people who run into issues or have questions related to the App Platform as part of DigitalOcean App Platform Hackathon on DEV 🎉 

**If you get stuck or run into a question about App Platform, describe it in this thread for asynchronous assistance from members of the DigitalOcean team — they'll be monitoring this post regularly!**

Happy coding ❤️
Hunt some strange numbers with Python.
Tags: python, numbers, watercooler
Published: 2020-12-10 16:49:10

We have heard about Different types of numbers and series.
For example __Ramanujan Number__, is the smallest number which can be expressed as the sum of two different cubes in two different ways.

Today we are going to see some another strange types of numbers and how to generate it with Python.

## __How strange!__

Lets take a look at this number ..
The __number 2520__  looks like a normal number like other numbers, but it is not like that.
The strange thing is that it is divisible by numbers from 1 to 10, whether these numbers are odd or even !!

### __Lets see:__

2520 ÷ 1 = 2520
2520 ÷ 2 = 1260
2520 ÷ 3 = 840
2520 ÷ 4 = 630
2520 ÷ 5 = 504
2520 ÷ 6 = 420
2520 ÷ 7 = 360
2520 ÷ 8 = 315
2520 ÷ 9 = 280
2520 ÷ 10 = 252

See its awesome... But there is many more numbers like that.
Example: 5040,7560 

***

Lets find more numbers like this by the way we Programmers do .. 
We are going to do it Programmatically with Python 🐍

## Lets get started.

Aim:
* Find numbers which are divisible by numbers from 1-10

Code:
```python
def check(id: int):
	for i in range(1,id):
		check= 0
		for j in range(1,11):
			if i%j==0:
				check= check+1
		if check==10:
			print(i)
				
				
check(100000)				
				
	
```
The Code is simple.

* We are getting numbers from 1-100000(here) using for loop and range.
* We are initialising a variable to check for divisibility.

```python
check=0
for j in range(1,11):
	if i%j==0:
		check= check+1
if check==10:
     print(i)
```

* In the for loop we are checking the divisibility of the number with each numbers from 1-10.
* If a number is divisible the it will increment check by 1.
* Finaly we check if variable check is equal to 10 ( Means that the numbers is divisible by each in 1-10)

Final Output:
```python
2520
5040
7560
10080
12600
15120
17640
20160
22680
25200
27720
30240
32760
35280
37800
40320
42840                                         45360
47880
50400
52920                                         55440
57960
60480
63000
65520
68040
70560
73080
75600
78120
80640
83160
85680
88200
90720
93240
95760
98280
```
***

That is for today guys .Thanks for reading the blog.
Invoking and handling privates and all other methods of an object with and without the use of Reflection in Java
Tags: java, tutorial, reflection, programming
Published: 2020-12-10 16:42:56

For methods handling we are going to use **Methods** component; Methods component uses to cache all methods and all method handles for faster access.  In order to accomplish the task, we initially need to add the following dependency to our _pom.xml_:

{% gist https://gist.github.com/Roberto-Gentili/536ee2d3f775030d46d82a008da10dbe.js %}

Let’s take a look at the code now:

```java
import static org.burningwave.core.assembler.StaticComponentContainer.Classes;
import static org.burningwave.core.assembler.StaticComponentContainer.Methods;

import java.lang.invoke.MethodHandle;
import java.lang.reflect.Method;
import java.nio.ByteBuffer;
import java.security.ProtectionDomain;
import java.util.Collection;

import org.burningwave.core.classes.MethodCriteria;


@SuppressWarnings("unused")
public class MethodsHandler {
    
    public static void execute() {
        //Invoking method by using reflection
        Methods.invoke(System.out, "println", "Hello World");

        //Invoking static method by using MethodHandle
        Integer number = Methods.invokeStaticDirect(Integer.class, "valueOf", 1);
        
        //Invoking method by using MethodHandle
        Methods.invokeDirect(System.out, "println", number);
        
        //Filtering and obtaining a MethodHandle reference
        MethodHandle methodHandle = Methods.findFirstDirectHandle(
            MethodCriteria.byScanUpTo((cls) ->
            //We only analyze the ClassLoader class and not all of its hierarchy (default behavior)
                cls.getName().equals(ClassLoader.class.getName())
            ).name(
                "defineClass"::equals
            ).and().parameterTypes(params -> 
                params.length == 3
            ).and().parameterTypesAreAssignableFrom(
                String.class, ByteBuffer.class, ProtectionDomain.class
            ).and().returnType((cls) -> 
                cls.getName().equals(Class.class.getName())
            ), ClassLoader.class
        );        
        
        //Filtering and obtaining all methods of ClassLoader class that have at least
        //one input parameter of Class type
        Collection<Method> methods = Methods.findAll(
            MethodCriteria.byScanUpTo((cls) ->
            	//We only analyze the ClassLoader class and not all of its hierarchy (default behavior)
                cls.getName().equals(ClassLoader.class.getName())
            ).parameter((params, idx) -> {
                return Classes.isAssignableFrom(params[idx].getType(), Class.class);
            }), ClassLoader.class
        );
    }
    
    public static void main(String[] args) {
        execute();
    }
    
}
```

We learned how to handle methods and the complete source is available [here](https://github.com/burningwave/core/tree/master/src/test/java/org/burningwave/core/examples/member).
Vue Google Maps Example Project - Maps, Markers, GeoCoder API, Map Resizing, Adding Markers, Adding InfoWindow
Tags: ionic, vue, tutorial, webdev
Published: 2020-12-10 16:39:07

The last of the 3 part video series is available now. [Ionic Framework](https://ionicframework.com/docs) [Vue 3](https://v3.vuejs.org/guide/introduction.html) and [Google Maps](https://developers.google.com/maps/documentation/javascript) Example Project - Maps, Markers, GeoCoder API, Map Resizing, Adding Markers, Adding InfoWindow

>#### Jump To Videos
PART ONE: https://youtu.be/HS2wdAtCYKg
PART TWO: https://youtu.be/XAaDe0-59EQ
PART THREE: https://youtu.be/XS-lIBBIJSc


Maps are a critical part of many web and mobile solutions and the rich set of functionality provided by Google Maps make it an obvious choice in many situations. When I was looking for a Vue3 compatible solution I really didn't find anything I loved so I decided to see how to roll my own.

####Part One - Getting the Map on The Page
1) In this video, we create a vue 3 google map component using the newer SFC component with setup. We will and marker, infoboxes, event handlers, and access to related services as we work through the project.
We also end the video by deploying the build to IOS and Android devices to showcase Capacitor
{% youtube HS2wdAtCYKg %}

####Part Two - Markers and InfoWindow
2) In this video, we create a vue 3 google map component using the newer SFC component with setup. We will add infoboxes, event handlers we created in part one. We will also demonstrate how to dynamically add new markers to the map and have the map update to reflect the changes.
{% youtube XAaDe0-59EQ %}

####Part Three - GeoCoder & Map Bounds
3) In this video, we use the google geocoder service to allow the user to enter an address, find the lat, lng, and then add the marker to the map. For a great user experience, we add functionality to automatically recalculate the map bounds so it adjusts to show all markers whenever a new marker is added
{% youtube XS-lIBBIJSc %}
I can execute your digital start-up idea
Tags: startup, javascript, react, webdev
Published: 2020-12-10 16:30:11

I have 10 years of commercial experience in web dev and I developed my own [product](https://www.glue.codes) to make frontend easier and deploy faster. I worked in agile teams and used many different tools on frontend and backend. Going through my recent journey i.e., my start-up, I gained broad perspective on web dev, especially frontend. I have designed and implemented an app to build reactive apps that spits out production-optimised code. It can be understood as a web-based IDE and bundler where a developer codes without being aware of the complexity underneath. Things like uni-directional state flow, scoped CSS, theming, image lazy-loading, HTML to Virtual DOM transformation, generating prerendered HTML and build-time optimisations. I know how to deal with complex problems on frontend and how to split them into manageable pieces. I have a solid OOP background which strengthens my every-day functional (or function-first) programming. In the world of highly opiniated web dev, I value great results over the tools used to achieve them. Let us have a friendly conversation. If it clicks, I can start immediately. :email: chris@glue.codes
Hello world!
Tags: firstpost
Published: 2020-12-10 16:28:50

### Hi. I'm Adam, and I like code.

I just created my account here, so I thought a first post was in order. I'm excited to join this community, and all the other communities out there for people like me.

I recently completed a Software Development course at [Eleven Fifty Academy](https://elevenfifty.org/), during which I received the Learner Award. This course gave me skills in C#, .NET, Web API, MVC, HTTP in Postman, Razor, and Code First application design.

Next, I'm moving into the Web Development course at Eleven Fifty, where I'll be building on my knowledge of HTML & CSS, and learning new skills in JavaScript, React, Node.js, and other developer tools.

I can't begin to express how I excited I am to learn all these new things & expand my skill set. My background is in military/security, team management, and customer-facing solutions engineering. Immersing myself into a technical field is like a dream come true, and I can't wait to take my next steps along this journey.

Thanks for stopping by!
[Year End] What was the best book you read this year?
Tags: discuss, books, yearend
Published: 2020-12-10 16:10:05

---
title: [Year End] What was the best book you read this year?
published: true
description: Looking for book recommendations for 2021
tags: discuss, books, yearend
//cover_image: https://direct_url_to_image.jpg
---
How to Build a COVID-19 Tracker in 3D in 15 Minutes or Less
Tags: tutorial, programming, unity3d, augmentedreality
Published: 2020-12-10 16:02:18

Looking to create a visualizer that features COVID-19 cases in a more engaging way? Try using 3D or augmented reality (AR)! Here’s a step-by-step guide to quickly create a simple COVID-19 spread visualizer demo with Unity and echoAR. The full demo can also be found on echoAR’s [GitHub] (https://github.com/echoARxyz/Unity-echoAR-demo-COVID19).

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0kvo88d7kuyqqxj80gnj.png)

**Register**
Don’t have an API key? Make sure to register for FREE at [echoAR] (https://console.echoar.xyz/#/auth/register).

**Setup**
* Create a new Unity project.
* [Install the echoAR Unity SDK] (https://docs.echoar.xyz/unity/installation).
* Open the sample scence under *echoAR/Examples/sample.unity.*
* [Set the API key] (https://docs.echoar.xyz/unity/using-the-sdk) in the Inspector of the echoAR game object.
* [Add the 3D model] (https://docs.echoar.xyz/quickstart/add-a-3d-model) from the [models] (https://github.com/echoARxyz/Unity-echoAR-demo-COVID19/tree/master/models) folder to the console.
* [Add the metadata] (https://docs.echoar.xyz/web-console/manage-pages/data-page/how-to-add-data#adding-metadata) listed in the [metadata.csv] (https://github.com/echoARxyz/Unity-echoAR-demo-COVID19/blob/master/models/metadata.csv) file.
* Overwrite the existing *echoAR/CustomBehaviour.cs* script with the new [*CustomBehaviour.cs*] (https://github.com/echoARxyz/Unity-echoAR-demo-COVID19/blob/master/CustomBehaviour.cs) file.

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

**Run**
Simply press the *Play* button in Unity.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0kvo88d7kuyqqxj80gnj.png)

**Learn more**
Refer to our [documentation] (https://docs.echoar.xyz/unity/) to learn more about how to use Unity and echoAR.

**Support**
Feel free to reach out at support@echoAR.xyz or join our [support channel on Slack] (https://join.slack.com/t/echoar/shared_invite/enQtNTg4NjI5NjM3OTc1LWU1M2M2MTNlNTM3NGY1YTUxYmY3ZDNjNTc3YjA5M2QyNGZiOTgzMjVmZWZmZmFjNGJjYTcxZjhhNzk3YjNhNjE).

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

---------------
echoAR (http://www.echoAR.xyz; Techstars ’19) is a cloud platform for augmented reality (AR) and virtual reality (VR) that provides tools and server-side infrastructure to help developers & companies quickly build and deploy AR/VR apps and experiences.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gddug6b88z8njzyew0m8.png)
Want to learn python?
Tags: python, developer, coding
Published: 2020-12-10 15:40:34

Today coding is one of the most in-demand professions, talent, and knowledge. The world today is full of technology and so good coders are the basic need of any new start-up.
In the long list of programming languages today, Python leads on top because of its
Versatility
Ease of learning
Simple syntax
Availability of packages

Learning python is a must for every programmer. In the huge crowd of different sources of learning python, it's hard to filter out good sources that can really teach you python in the right way and in the right time limit.
So Here are some filtered sources that you can use.
Youtube channel - https://www.youtube.com/channel/UCeVMnSShP_Iviwkknt83cww

Blogs -
https://pythonschool.xyz
https://beginnerspythonbysanatjha.blogspot.com
Release 4.0 Mid point
Published: 2020-12-10 06:18:51

During the middle of Release 4.0 I have fixed the description to [jsonMergeUtil](https://github.com/Blank1611/jsonmergeutils/pull/16) and fixed a bug in the program which gave me a hard time to actually find out why this was happening.

Basically Python has a library called logger, where you can log stuff. In my previous request I added an optional argument when running the program to specify the logging level, if you are logging at INFO it will output whatever is loaded into the logging.info variable in another file called output. Basically it wasn't outputting anything, which was pretty bad because that means that my last commit to this repository actually broke the program a little bit. Luckily I could fix this program in just 1 line after a while of searching through the logger [documentation](https://docs.python.org/3/library/logging.html).

I've also decided to pick up another issue from a project named dev-jot which is a web based project that allows developers to jot down note quickly (I really like the idea). The pull request that I made can be found [here](https://github.com/jrobind/dev-jot/pull/43). It was very small and just a little pull request but I actually had to do some research about viewports and meta tags, which I think is actually going to be really useful for me since I can implement this in my own personal website [mljbrackett.com](https://mljbrackett.com)

While it was small I actually learnt some good things about using Google Lighthouse to give your website a quick score on how you are doing.


I have also begun work on my [third issue](https://github.com/FreeTubeApp/FreeTube/issues/811) which is from the project FreeTube. I've done a little work on it so far and have narrowed down the larger problem to one of the functions that needs to be run never actually gets run because of an if statement calling it. I haven't gotten past that yet and am still looking into it.

I'm looking forward to fixing this bug though cause it's a hard one and this is for sure gonna feel good when I fix it.

Weirdly enough I get such a great feeling when I fix a hard bug but I assume most developers feel the same way.
Basics of openpyxl : A Python module for Excel files
Tags: python, excel, openpyxl, automation
Published: 2020-12-10 15:19:57

This is an introduction to openpyxl, a Python module built for reading and writing Excel document files. 
Most often, we would like to automate many of our repetitive tasks on Excel using a programming language. 

Python's openpyxl module makes it very easy for us to access an excel file.
Note that Openpyxl is not a built-in module, therefore we need to install it first. 

#Installing Openpyxl 
Run the following code in your Python terminal to install Openpyxl. 
```python
Pip install openpyxl 
```
The above code installs the openpyxl module after a few minutes.
To use the openpyxl on our in python, we need to import it. 
```python 
import openpyxl 
```
Loading our excel file can be done by:
```python
from openpyxl import load_workbook
survey = load_workbook("ourworkbook.xlsx") 
```
The code above uses the imported load_workbook method to read the excel file of interest and  stores it in variable "survey" 
Note that the file we are accessing must be in the same folder we are working from.

Excel document can contain many sheets, to print all the active sheets in the excel file .
```python
 print(survey.sheetnames)
```
The above code will display the name of the active sheets in the excel files.
To access the first sheet in the document:
```python
 first = survey.active
```
We stored the first sheet in the excel document as variable "first"
 
##Rows and columns in excel file
Accessing column A:
```python
col_A = first["A"]
col_A
```
To access range of columns:
```python
range_A_to_C = first["A:C"]
print(range_A_to_C)
```
The range of columns from A to C is stored in the variable "range_A_to_C" as it is shown in the above code, we can thus print it out.

There are quite few nice things we can do with the Openpyxl module in Python, and interested person should check [Openpyxl documentation] (https://pypi.org/project/openpyxl/) for more information. 

Openpyxl has been around for quite some time now and has its own usefulness. However, better tools (eg. pandas) has been developed in Python for better handling of Excel file.
I made two new blogs.
Tags: blogs, html, newblogs
Published: 2020-12-10 15:14:38

The way of displaying the content inspires me a lot. Mostly, I keep on visiting the new sites, but this site really looking me a great platform. 

Shout out from:Saqib Ramzan
My Latest Blogs: 
<a href="https://www.chillitos.net/2020/12/how-to-open-a-coconut.html"> How to open a coconut? </a>
<a href="https://www.chillitos.net/2020/12/how-to-soften-brown-sugar-easy.html"> How to soften brown sugar</a>
Change column type in pandas to numeric (particular case)
Tags: python, pandas, dataframe, types
Published: 2020-12-10 15:11:11

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/562vvfmkr51besdajt2o.png)

to convert the columns to numeric types, you have four main options:

1. to_numeric()
2. astype()
3. infer_objects()
4. convert_dtypes()

however, none of the four works in this case because each value has a thousands separator with a comma and a decimal separator with a dot, so this causes error.

You must delete the comma and then you can convert it to numeric.

df[column].str.replace(",", "").astype(float)
Exploring PHP8 new goodies - match expression
Tags: php
Published: 2020-12-10 14:36:10

It's here, just in time for Christmas! I'm not sure how many will be using PHP8 in production this year, but that's not to say many of us aren't already trying it on smaller side projects to get a taste of some of the new features. 

My favourite so far, the new [`match()` expression](https://www.php.net/manual/en/control-structures.match.php). 

Many other programming languages including Haskell, Erlang, and Elm, have a similar feature, but previously PHP only had the switch statement.

The `switch` statement is _fine_, but you have a few things to be mindful of. 

Firstly a `switch` doesn't return a value, it's not an expression, although you can return early from a `switch` statement
```php
switch ($operation) {
    case 'nop':
        return $this->nop();
    case 'acc':
       $this->acc($argument);
    case 'jmp':
       return $this->jmp($argument);
}
```
https://github.com/petemcfarlane/advent-of-code-2020/blob/8f5cc97377e2313e7fcbf60fb739e8084b01025e/day8/index.php


With a `match` this becomes much terser
```php
return match ($operation) {
    'nop' => $this->nop(),
    'acc' => $this->acc($argument),
    'jmp' => $this->jmp($argument),
};
```

It's also easier to prevent mistakes, like forgetting to return on the `"acc"` branch in the previous `switch` example.

A match can match multiple values, if they are comma separated, so I could write the above as 
```php
return match ($operation) {
    'nop' => $this->nop(),
    'acc', 'jmp' => $this->{$operation}($argument),
};
```
Although in this case I'm not sure it's particularly easier to read.

There is a `default` branch you can use if you want to specify what should be returned if there is no match. You can also use arbitrary functions for comparisons in the match conditions.

```php
function validateEmail(string $email): string
{
    return match (true) {
        str_contains($email, '@example.com') => 'an example email',
        $email === filter_var($email, FILTER_VALIDATE_EMAIL) => 'a valid email',
        default => throw new InvalidArgumentException('Invalid email address')
    };
}

var_dump(validateEmail('hello@example.com')); // returns 'an example email'
var_dump(validateEmail('foo@bar.com')); // returns 'a valid email'
var_dump(validateEmail('invalid email')); // throws InvalidArgumentException
```
In this example I'm also taking advantage of being able to throw exceptions in 

We also get a new `UnhandledMatchError` if we forget to declare a path. This can be somewhat useful, like the PHP7 `TypeError`, as the exception includes the type of value we tried to match, but not the value itself.

It would be really cool to be able to do partial matches or some kind of destructuring in the future, not sure if this going to be at all possible, something like
```php
class A {
    public function __construct(public int $n) {}
}

class B {
    public function __construct(public int $n) {}
}

$x = new A(1); // or new B(2);

match ($x) {
    new A($n) => $n,
    new B($n) => $n,
};

```
Ajax Tutorial for Beginners
Published: 2020-12-10 14:21:53

Whether you're a novice or a professional and you're searching the best ajax tutorial to learn,There are a number of tutorials showing the various opportunities to learn the ajax, but you will find the best tutorial, then visit our ajax tutorial for beginners, Here you will learn ajax for each and everything with a simple example. https://www.phptpoint.com/ajax-tutorial/