teleren/devto huggingface dataset:
High speed-dev: A minute to be up & running
Tags: neoan3, php, showdev, laravel
Published: 2022-08-17 03:05:33

## No, it doesn't run on PHP 7.2!

The neoan-core **Lenkrad** doesn't play the compatibility game. Being backward compatible to older PHP versions or playing nicely with a plethora of ecosystems is a challenge that not only slows down development, but results in verbose usage and unoptimized core code.

I wanted to have a framework for the next generation. I wanted to finally have a framework that let's me write business logic the way I want it to behave. 

Let's compare:

In Laravel, I need a migration and a model to make the Eloquent ORM work:

**the migration**
```php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
 
return new class extends Migration
{
    
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->string('password');
            $table->string('email')->unique();
            $table->timestamps();
        });
    }
 
    public function down()
    {
        Schema::drop('users');
    }
};


```

And **the model**
```php
namespace App\Models;
 
use Illuminate\Database\Eloquent\Model;
 
class User extends Model
{
    
    protected $table = 'users';
}
```

We might be used to this, but what we really want to write is:

```php

class User extends Model
{
   #[IsPrimaryKey]
   public readonly int $id;
   public string $name;
   
   #[Transform(Hash::class)]
   public string $password;

   #[IsUnique]
   public string $email;

   use Timestamps;
}

```

The advantage is not only easier reference and less verbose code. Your IDE will be able to better help you with navigating objects through auto-completion:

```php
$user = new User();
$user->name = 'Adam'; // name was suggested, as it's a property of the model class
...

```

## Interested?

If you have PHP8.1 and interested in seeing how a framework could actually make your life easier, try it out:

`composer create-project neoan.io/starter-project [my-app]` 

The package is light in dependencies and up & running in seconds. Feedback highly appreciated!
Git
Tags: git
Published: 2022-08-17 03:03:24

Disponible: 13 de ago de 2022 0:00hasta 17 de ago de 2022 23:59 hasta 17 de ago de 2022 23:59

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vajds8hk5sa2xoouz7b1.jpg)

Que es git?
Git es un sistema de control de versiones, donde cambia los archivos a lo largo del tiempo para que se puedan recuperar versiones especificas mas adelante y tener un historial de cada cambio realizado. 

#Comandos basicos 

### git init
Este comando creara un area conocida como "stagin" donde se guardan temporalmente nuestros archivos y un repositorio local

### git status
Nos muestra en que estado se encuentran los cambios de los archivos

### git add 
añade el archivo a stagin
---git add nombre_archivo
---git add . añade todos los cambios realizados en el desarrollo

### git commit
Guarda los archivos en el repositorio local
    git commit -m "mensaje descriptivo"

### git rm
Elimina el archivo de tu directorio de trabajo y no elimina su historial del sistema de versiones.

### git pull
Actulializa el repositorio y trae los cambios realizados, si se trabaja en equipo. para control de versiones.
Become a Force Multiplier
Tags: productivity, leadership, tutorial
Published: 2022-08-17 02:41:18

It can be counterintuitive, but to be the most productive employee possible, you may need to do <u>less</u>.

#What is a Force Multiplier
A force multiplier doesn't just accomplish more work than others, although it does look that way to leadership. It's someone who can enable the rest of their team and even other teams to work more effectively. It is about being constructive with your feedback, and constantly looking for ways to optimize your work.
 
For example, If you are scrambling to get 10 hours of work done in 8 hours every day, you should take a step back and think about how to streamline or automate your work into something more manageable. Depending on the process, you may need to prioritize ROI on automation, meaning don’t spend a week trying to save yourself 5 minutes, but in general you should at least give some thought to any recurring task and think "if I need to continue doing this, is there a better way to do it"
 
#How to become a Force Multiplier
The easiest way to become a force multiplier is to **share what you learn.** Sharing knowledge with your team proactively is a benefit because your team can become more effective when they are not coming to you individually with the same questions. It also is very useful so you don't have to be bothered when you take PTO.
[LeetCode The Hard Way] 1494. Parallel Courses II (DP + Bit Manipulation)
Tags: leetcode, leetcodethehardway, cpp, programming
Published: 2022-08-17 02:29:02

Please check out [LeetCode The Hard Way](https://wingkwong.github.io/leetcode-the-hard-way/) for more solution explanations and tutorials. If you like it, please give a star and watch my [Github Repository](https://github.com/wingkwong/leetcode-the-hard-way).

---

```cpp
class Solution {
public:
    int minNumberOfSemesters(int n, vector<vector<int>>& dependencies, int k) {
        // dp[i] : the minimum number of semesters needed to take the courses with the bit set in i
        // the worst case is that in each semester we can only take one course, hence initialise with `n`
        // at the end, the answer would be dp[(1 << n) - 1], i.e. all bits set
        vector<int> dp(1 << n, n);
        // if the i-th bit is set in pre[j], 
        // that means we need to take course i in order to take course j
        vector<int> pre(n);
        // build the prerequisites
        for (auto& x : dependencies) {
            // make it 0-based index
            --x[0], --x[1];
            // set the bit at x[0]-th place
            pre[x[1]] |= 1 << x[0];
        }
        // base case: 0 semester. 0 course.
        dp[0] = 0;
        // i is a set of courses that we've already studied
        for (int i = 0; i < (1 << n); i++) {
            // init can as 0 to record how can courses we can study
            int can = 0;
            // iterate all courses
            for (int j = 0; j < n; j++) {
                // check if we've studied prerequisite courses
                if ((pre[j] & i) == pre[j]) {
                    // if so, we can study course j
                    can |= (1 << j);
                }
            }
            // remove those courses that we've already studied
            can &= ~i;
            // enumerate all the bit 1 combinations of `can`
            // i.e. all subsets of a bit representation
            for (int s = can; s ; s = (s - 1) & can) {
                // check if we can take __builtin_popcount(s) courses
                if (__builtin_popcount(s) <= k) {
                    // if so, we combine the previous results (what've studied already)
                    // or we take a new semester
                    dp[i | s] = min(dp[i | s], dp[i] + 1);
                }
            }
        }
        // same as dp[(1 << n) - 1]
        return dp.back();
    }
};
```
Project Planner online
Tags: projectplanne, projectstracke
Published: 2022-08-17 02:20:37

[Project planner](https://projectplanner.ai/) is an online tool for teams to manage a project, track progress and stay on budget. Project planner can be used for managing projects of any size, complexity or duration. Project managers this tools to help them plan and organize their projects in order to meet deadlines, minimize risk and maximize efficiency. The goal is to get the work done without wasting time or resources on unimportant tasks that don't add value to the final product or service delivered by the company
Next.JS Successes and Struggles
Tags: nextjs, webdev
Published: 2022-08-17 02:20:01

### Intro

Over the past two weeks or so, I've been developing an online ARPG site in Next.JS. This was purely an experiment in trying out different languages and libraries, so I wasn't going for the most efficient web application; I was determined to build this web application using a very specific tech stack.
When Next.JS was introduced to me by a friend about a year ago, it was pitched to me as "backend built on the frontend...so you don't really need a backend. Because it's on a frontend." Obviously, I was intrigued. 
Prior to using Next.JS, I'd been mostly using Flask for simpler web apps and Django if I needed anything more complex. For databases, I usually used either PostgreSQL or just plain MySQL. To really throw myself into the challenge, this time I used Next.JS with NoSQL (specifically MongoDB). 

### Successes

I had developed a bit of a penchant for building static sites with [Zola](https://www.getzola.org/) and horribly misusing TOML templating, so I did really enjoy Next.JS's function components. I had a lot of sections on the same page that needed to look the same with different information, so it was really easy to just map over it. 
The documentation for Next.JS was also fairly clear and easy to navigate. 
I was a big fan of `useState`s, although I guess that's more of a React component than Next.JS. 
Overall, and it pains me as someone who likes to keep things based on tangible evidence, it did *feel* more lightweight. 

### Struggles

When thinking of struggles with Next.JS, it's very easy to compare it to my past experience with Django. I think the biggest issue I had was that user authentication was a lot harder with Next.JS, in particular because I had to rely on an authentication platform since "backend built on the frontend" is just code for "some backend features! But still mostly frontend". 
When querying database data, I forget what documentation I read, but some of the documentation for Next.JS very clearly stated that instead of accessing an API, it was better to just query the database directly in a Server Props wrapper, which was a bit odd. 
Completely unrelated to Next.JS, but I also did miss being able to use relations from PostgreSQL, although I committed to using NoSQL this time.
HRMS
Tags: hrms
Published: 2022-08-17 02:15:38

HRMS is a software that can be used to manage the human resources of a business. There are various benefits of using [HRMS](https://hrms.ai/) which can help in improving your team's performance and profitability.
With HRMS, you can:

- Hire employees and track their performance
- schedule interviews and manage them through your system
- Track what your employees are doing with their time and make sure they're working on the right things
- Easily view all employee data in one place
Cara Mengaktifkan hashtag Twitter di lokasi tertentu
Tags: hashtag
Published: 2022-08-17 02:01:25

Twitter adalah tempat di mana berita utama muncul, tautan dibagikan secara luas, dan meme dibuat. Jadi, cukup mudah untuk bergabung dan memulai percakapan di Twitter.

Tetapi banyak orang tidak tahu cara mengaktifkan hashtag Twitter Trends hanya untuk lokasi tertentu dan mengikutinya.

Nah, untuk yang penasaran bagaimana caranya! Panduan berikut ini akan membantu kamu melalui <a href="https://ekatekno.live-website.com/cara-menggunakan-hastag/">menggunakan hashtag Twitter</a> yang sedang trending hanya terlihat di lokasi tertentu.
<h2>Cara Mengaktifkan hashtag Twitter di lokasi tertentu</h2>
Twitter menampilkan tren berdasarkan lokasi dan siapa yang kamu ikuti. Sama seperti tren Twitter di seluruh dunia, kamu dapat melihat tren untuk lokasi tertentu dari akun Twitter.

Berikut cara mengaktifkan dan mengikuti hashtag tren Twitter untuk lokasi tertentu saja.
<ol>
 	<li>Buka aplikasi Twitter di smartphone.</li>
 	<li>Ketuk ikon <strong>Profil</strong>.</li>
 	<li>Pilih <strong>Pengaturan dan Privasi</strong>.</li>
 	<li>Gulir ke bawah ke <strong>Privasi dan keamanan</strong>.</li>
 	<li>Di bawah layar Aktivitas Twitter, pindah ke bagian Konten yang kamu lihat.</li>
 	<li>Pilih pengaturan Jelajahi.</li>
 	<li>Aktifkan <strong>Tampilkan konten di lokasi Anda saat ini</strong>.</li>
</ol>
Proses menemukan topik regional yang sedang tren di Twitter sangatlah mudah. Namun, terlepas dari perubahan yang kita buat, sebagian besar acara dan percakapan berita dunia dan lokal akan terus muncul dalam tren kita.
<h3>Membuat hashtag trending di Twitter untuk suatu wilayah</h3>
Buka aplikasi Twitter kemudian pilih ikon gambar profil Twitter dari menu atas. Buka <strong>Pengaturan dan privasi</strong> kemudian gulir ke bawah ke bagian <strong>Privasi dan keamanan</strong> dan pilih.

Nanti akan diarahkan ke layar baru, yaitu <strong>aktivitas Twitter Anda</strong>. Di bawahnya, pindah ke opsi <strong>Konten yang Anda lihat</strong>.

Selanjutnya, perluas bagian <strong>Jelajahi Pengaturan</strong> untuk memilih apa yang ingin dilihat di Twitter berdasarkan preferensi seperti Topik dan minat. Ketuk entri <strong>Jelajahi lokasi</strong> untuk memilih wilayah atau negara.

Terakhir, geser sakelar di sebelah opsi <strong>Tampilkan konten di lokasi Anda saat ini</strong> ke posisi <strong>Aktif</strong> untuk mengikuti hashtag Twitter yang sedang tren di wilayah tersebut. Untuk misalnya Twitter Trends Indonesia untuk wilayah Indonesia.
<h3>Mengubah lokasi trending di Twitter</h3>
Di bawah layar <strong>pengaturan Jelajahi</strong>, alihkan sakelar di sebelah <strong>Tampilkan konten di lokasi Anda saat ini</strong> ke posisi Mati. Kemudian, ketuk <strong>Jelajahi lokasi</strong> untuk memilih lokasi yang diinginkan.
<h3>Kenapa Wilayah Saya Tidak Ditampilkan</h3>
Bila tidak menemukan negara atau kota pilihan kamu, itu berarti Twitter tidak menerima cukup Tweet dari area tersebut atau menghasilkan cukup data geografis Twitter untuk membuat daftar. Dalam kasus seperti itu, tren untuk lokasi tertentu tidak akan terlihat.
Not Ready for NEW Netlify Pro?
Tags: ssg, webdev, javascript, tutorial
Published: 2022-08-17 01:31:00

Developer-favorite hosting platform Netlify recently announced a major change affecting end users on their free service tier: effective September 30, 2022 websites hosted in private organization repositories must move the their paid "Pro" hosting tier [https://www.netlify.com/pricing/private-org-repo-faq/?_ga=2.48367394.50871513.1660645843-1993254338.1660645843](https://www.netlify.com/pricing/private-org-repo-faq/?_ga=2.48367394.50871513.1660645843-1993254338.1660645843)

## Options for Avoiding the Pro Version

The FAQ linked above describes the move and options for developers who need to avoid the pro version.

If you are not ready for the NEW Netlify Pro--like the author--you have to determine the option right for you and your client.

I prefer the simplicity of Netlify's automated builds so moving to a CLI option was not for me.

I am not keen on opening my website source to the public and my clients are not contributing to the organization-owned repository, so the solution that seems right is moving the sites to private repos on my GitHub account.

I was able to accomplish the migration fairly simply.

## Moving Netlify Sites to Private Personal GitHub Repositories

1. Create new repository on personal account
2. Set privacy
3. Copy repository URL
4. Change remote URL in local repository
5. Push to new repository
6. Change repository in Netlify Site Settings
7. Confirm successful build

### Create a New Repository

Log in to your GitHub account. Instead of using an organization, create a NEW repository in your own account. You will be pushing your existing repository to this one so do not add README.md or anything else.

### Set Privacy

The whole reason for migrating from the organization account is that you want to keep your repository private, so set the privacy before you publish your new repo.

### Copy Repository URL

Once the new empty repository opens up copy the URL.

### Change the Remote URL in Local Repository

First, make sure your local repository is up to date with your production. If not, merge those. Then change the remote URL in your local repository. The following code works in terminal:

```
git remote set-url origin https://github.com/username/link-to-repo.git
```

### Push to New Repository

Now you are ready to push your code to your new empty private repo on your account.

```
git push origin master
```

### Change Repository in Netlify Site Settings

Now go to Netlify. In your site Settings under "Build and Deploy" select the "Manage repository" button to "Link to a different repository". Here, you'll select your new repository (you are also given other git hosts).

### Confirm Successful Build

Once you configure your build you'll be able to trigger a new build. Watch the dialog to confirm your build was successful. If all goes well you have successfully migrated your website and redeployed with zero downtime and you are free from the upgrade fees.
Introduction to Data Structures and Algorithms | 000
Tags: python, algorithms
Published: 2022-08-17 00:49:00

**I am going to call Data Structures and Algorithms as DSA**
**Code written is in Python**


## Why DSA?
The main moto to learn DSA is to know how to write optimized code. In this age of *Cloud Functions*, the optimized code requires less money as less computation and memory is used in the servers. On the other hand if you don't write optimized code, you will have to pay more money and also the results from the cloud servers would be very slow.

## Judging code
Now you know that writing optimized code would save your time. But how will you judge if a code is optimized or not? 
Many people say that the less number of lines means the more optimized code. But this is a true lie. Optimized code can't be judged by the number of lines but the parameters involved in the code. Judge this case:

**Problem Statement**: Generate a series of number from 1 to n and store it in a variable or function so that it can be accessed later

Code 1:
```
def gen_series():
    a = []
    n = int(input("What's n? "))
    for i in range(1, n+1):
        a.append(i)
    return a

def print_series():
    a = gen_series()
    for i in a:
        print(i)

if __name__ == "__main__":
    print_series()
```

Code 2:
```
def gen_series():
    n = int(input("What's n? "))
    a = series(n)
    print(a)
    return a

def print_series():
    a = gen_series()
    for i in a:
        print(i)

def series(n):
    d = 11
    for i in range(1, n+1):
        yield i + d
        d += 11

if __name__ == "__main__":
    print_series()
```

If you count the number of lines, you would say Code 1 is more optimized but is it?

In both the cases the series is generated and stored inside the function named `gen_series()`. If you know about the `sys.getsizeof()` method in python, you will know that it gives out the memory used inside a variable, function. If you write this in your code editor, run the program, and enter 200 as the input of `What's n?`
```
import sys


def gen_series():
    a = []
    n = int(input("What's n? "))
    for i in range(1, n+1):
        a.append(i)
    return a


def print_series():
    a = gen_series()
    for i in a:
        print(i)


if __name__ == "__main__":
    print(sys.getsizeof(gen_series()))
```

You will get the memory used in bytes. And surprisingly, you will notice that the 2nd code consumes less memory.

So, we can come to a conclusion that less code always doesn't mean optimized code. For a code to be judged, the parameters are important.

## Programming Language
DSA is mostly independent of programming language the main things which matter are the concepts. I'll be using python in the next articles regarding DSA
Dev For Coins
Tags: blockchain, startup, webdev, javascript
Published: 2022-08-17 00:21:14

I am looking for help with a project for a building a new cryptocurrency or token or ICO. This is a very new cool idea that I don't believe has been done yet and it relates to trading bots and ICO's and cryptocurrencies. I need a  developer to help me get a coin built. If you have experience in development and want to get in on a big exciting project on the ground floor then contact me for more information on this opportunity.

newsres333@gmail.com
Importing and Exporting Modules in JavaScript
Tags: javascript, beginners, tutorial
Published: 2022-08-16 23:14:00

- Name Export

```javascript
export const name = 'value'
```

- Name Import

```javascript
import { name } from '...'
```

---

- Default Export

```javascript
export default 'value'
```

- Default Import

```javascript
import anyName from '...'
```

---

- Rename Export

```javascript
export { name as newName }
```

- Name Import

```javascript
import { newName } from '...'
```

---

- List Export and Renaming

```javascript
export {
    name1,
    name2 as newName2
}
```

- List Import and Renaming

```javascript
import {
    name1 as newName1,
    newName2
} from '...'
```

---
Javascript Tagalog - Function Expression
Tags: javascript, tagalog, pinoy, functions
Published: 2022-08-16 22:55:03

**Ano ngaba ang Function Expression sa Javacript?**
- Ang Function Expression ay isang paraan ng pag dedefine ng function
- Ang mga function declaration ay di hoisted so di mo sila pwede gamitin hanggat dipa sila na dedefine

---

**Pag dedefine ng Function Expresion**
![Function Expression Javascript Tagalog Filipino Philippines](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dpeiacc19i1qp9if4md6.png)
eto naman using arrow function
![Function Expression Javascript Tagalog Filipino Philippines](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jjk568on9xuyfd0iuaod.png)

---

Yung mga Function Expression di sila Hoisted
![Function Expression Javascript Tagalog Filipino Philippines](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/crcawqr9sxw4ilb75tfb.png)
While yung mga Function Declaration Hoisted Sila
![Function Expression Javascript Tagalog Filipino Philippines](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9qs1t1wi42xn7w0k37vi.png)

---

**Note:**
Sa Javascript pwede mong i pass ang mga functions sa variables, pwede karin mag return ng function from a function, pwede moring i pass mga function as an arguments sa mga functions at iba pa.
**In short tinatrato ng Javascript ang mga Functions as Variables lang**
That's another topic nalang, kasi medyo advance pero eto mga documentation kung curious kayo
[MDN Documentation - First Class Functions](https://developer.mozilla.org/en-US/docs/Glossary/First-class_Function)

---

**More tagalog Javascript Learning Resources:**
https://javascript-methods-in-tagalog.vercel.app/
Javascript Tagalog - Function Declaration
Tags: javascript, tagalog, filipino, functions
Published: 2022-08-16 22:39:00

**Ano ngaba ang Function Declaration sa Javascript?**
- Ang function declaration ay isang paraan ng pag dedefine ng function.
- Ang mga Function Declaration ay **Hoisted **so pwede mo sila gamitin 
kahit nasa pinakababa pa sila ng code mo. (unlike function expression)


![Function Declaration Javascript Tagalog Filipino Philippines](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ofxf3tmf2nt7ul0qe4jp.png)

Unlike **Function Expression** di sila **Hoisted** so di mo sila ma-access before sila madefine.

![Function Declaration Javascript Tagalog Filipino Philippines](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/450uu5j74y6fcdp86agi.png)

---

**Note:**
Sa Javascript pwede mong i pass ang mga functions sa variables, pwede karin mag return ng function from a function, pwede moring i pass mga function as an arguments sa mga functions at iba pa.
**In short tinatrato ng Javascript ang mga Functions as Variables lang**
That's another topic nalang, kasi medyo advance pero eto mga documentation kung curious kayo
[MDN Documentation - First Class Functions](https://developer.mozilla.org/en-US/docs/Glossary/First-class_Function)

---

**More tagalog Javascript Learning Resources:**
https://javascript-methods-in-tagalog.vercel.app/