teleren/devto huggingface dataset:
Workflow Optimization
Published: 2023-08-26 17:51:01

For the last year, I've logged 1800 hours coding in Laravel using PhpStorm as my main IDE, on my PopOs Linux box. Some ways I've optimized my workflow are listed below. I'd love to hear what you do to optimize your workday as well:

## Shortcuts
- *Pinning/Unpinning Tabs (Control-p, Control-shift-p)*
Often times, when working on three or four files, I pin them so they don't get lost in the sea of other files I open along the way

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


- *Save as Live Templates*
Recently, I have been using live templates more and more, especially to help populate factory attribute lists when writing unit tests.

`[ 'project_id' => $this->project->getKey()]`







- *Compare With Branch*
If you click on a folder, then control-shift-a to search for actions, type in "Compare with Branch..."

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

This lets you easily see how your changes compares with your "staging" / "master" branch.  Whats nice is, when you switch branches, you can press the refresh button to update the list


- `PhpStorm squash commits`, `git push --force`
Before submitting a PR, I often squash all my commits to remove developer noise and provide a clean mearge for my code 
reviewer

## PhpStorm Plugins

- Quick Notes
The quick notes plugin is an absolute MUST have, great way to take notes right within your IDE:

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

## Git Commands
- `git checkout -`
Checkout the last branch I was working on


- `git stash / git stash apply` (in PhpStorm - Unstash changes)
This allows me to stash my current work if an urgent bug comes up that needs attending. Then I unstash (git stash apply) when I am able to return.

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

## Docker Commands
- `docker-compose-exec composer dump-autoload`

I use this after I rename (refactor) a class file so that composer knows it exists



## Bash Aliases

- `fix`
This command is an alias which I added to my .bash_aliases so I can easily clean my code before pushing to the repo:
`alias fix="./vendor/bin/php-cs-fixer fix --verbose --show-progress=none --using-cache=yes"`

## Artisan

- artisan route:clear
after adding new API routes, I run this to ensure cache is updated



If you like, let me know what some of your daily command / shortcut go-to's you find yourself using over and over again. I'd be curious to hear how you optimize your work day as well.
Java - Singly Linked Lists: Starting at the Top with `prepend(data)` 🎩
Tags: java, dsa, computerscience, singlylinkedlist
Published: 2023-08-26 17:49:12

Hey there, Dev.to enthusiasts!!! 🌈

Last time, we chatted about appending data to the end of a singly linked list. This time, we’re flipping the script. Let's focus on how to add new nodes at the *start* of the list using our `prepend(data)` method.

### Quick Rewind: Singly Linked List 📼

For those who've just popped in:

```java
class Node {
    int data;
    Node next;

    Node(int data) {
        this.data = data;
        this.next = null;
    }
}

class SinglyLinkedList {
    Node head;
    SinglyLinkedList() {
        this.head = null;
    }
}
```

Picture each node as a small box holding data and pointing to its neighbour (or `null` if it's feeling a tad antisocial).

### The Magic of Prepending 🪄

Prepending is akin to saying, "Hold my place at the front of the line!" Here’s how you do it in Java:

```java
public void prepend(int data) {
    // Create our brand-new node
    Node newNode = new Node(data);
    
    // New node points to the current head
    newNode.next = head;
    
    // And voila, it's now the head of the line!
    head = newNode;
}
```

### Why Prepend, Though? 🧐

Sometimes, adding to the start is just more efficient, especially if you're not concerned about the order of elements. Or maybe you have a use case where the most recent data is the most relevant. 

### Conclusion 🍂

Mastering both appending and prepending in your singly linked list toolkit ensures you're prepared for a diverse range of scenarios in coding. 

In [`the next article`](https://dev.to/hunorvadaszperhat/java-singly-linked-lists-goodbyes-with-deletewithvaluedata-2gh6) we will look at `deleteWithValue(data)` method



Happy coding and till next time! 🚀
Java - Singly Linked Lists: How to Append Like a Pro! 💾
Published: 2023-08-26 17:42:45


Hello again, Dev.to enthusiasts! 🌌

Continuing our journey with singly linked lists, let's discuss a key operation that I like to call "Add to the End." a'la `append(data)` method.

### A Quick Refresher: Singly Linked List 📘

For those who've just joined the party:

```java
class Node {
    int data;
    Node next;

    Node(int data) {
        this.data = data;
        this.next = null;
    }
}

class SinglyLinkedList {
    Node head;
    SinglyLinkedList() {
        this.head = null;
    }
}
```

Each node in our list holds some data and a pointer to the next node, or `null` if it's the last one in line.

### The Art of Appending 🖋

Appending is essentially adding a new node at the end of our list. Here's how you can perform this dance in code:

```java
public void append(int data) {
    // Let's create our shiny new node
    Node newNode = new Node(data);
    
    // If the list has the "I'm new here" vibes (is empty), make this node the head
    if (head == null) {
        head = newNode;
        return;
    }
    
    // If not, let's find the end of our list
    Node lastNode = head;
    while (lastNode.next != null) {
        lastNode = lastNode.next;
    }
    
    // Once we're at the end, let's welcome our new node
    lastNode.next = newNode;
}
```

### Why Appending? 🤷

Appending is like adding another chapter to your book. As your data grows and evolves, you'll often find yourself needing to add elements. Knowing how to efficiently append to your list ensures that your data structure remains dynamic and responsive to changes.

### Wrapping Up 🎁

With the power of appending, you can now let your singly linked list grow gracefully, always adding new data at the tail end. 

In [`the next article`](https://dev.to/hunorvadaszperhat/java-singly-linked-lists-starting-at-the-top-with-prependdata-mif) we will look at `prepend()` method


Happy coding and till next time! 🚀
Java - Understanding the Singly Linked List: Counting Nodes with size()
Tags: java, singlylinkedlist, dsa, computerscience
Published: 2023-08-26 17:36:08


Greetings, Dev.to tribe! 🌍

We've previously dipped our toes into the world of singly linked lists. Today, we're diving a bit deeper to tackle a common, yet crucial question: "How big is this thing?" Enter the stage: the size() method.

**Quick Refresher: Singly Linked List** 📜
In case you missed our previous chatter, here's what a basic singly linked list setup looks like:

```java
class Node {
    int data;
    Node next;

    Node(int data) {
        this.data = data;
        this.next = null;
    }
}

class SinglyLinkedList {
    Node head;
    SinglyLinkedList() {
        this.head = null;
    }
}
```
Each node carries data and a reference to the next node. If there's no next node, it points to the vast emptiness of null.

**Unveiling the size() Method** 🧮
Now, to the star of today's show. How do we figure out the length of our linked list?

```java
public int size() {
    int count = 0;
    Node currentNode = head;

    while (currentNode != null) {
        count++;
        currentNode = currentNode.next;
    }
    
    return count;
}
```
We start at the head of the list and traverse through, incrementing our count with each node we visit. When we hit null, it's game over and we return our count.

**Why Does Size Matter?** 🤓
Whether you're allocating resources, indexing, or just generally curious it helps ensure efficiency and gives you a solid grasp of the data you're working with.

**Signing Off** 🎤
And that's a wrap on the size() method! Until next time, keep those nodes connected!

In [`the next article`](https://dev.to/hunorvadaszperhat/java-singly-linked-lists-how-to-append-like-a-pro-o1o) we will look at the `append()` method

Cheers to another day of coding mastery! 🎉🚀
Python functions
Tags: functions, python
Published: 2023-08-26 17:32:56

```
print - Prints a value to the console.
if - Conditional statement.
for - Loop statement.
while - Loop statement.
def - Function definition.
class - Class definition.
import - Imports a module.
list - Creates a list.
tuple - Creates a tuple.
dict - Creates a dictionary.
str - Converts a value to a string.
int - Converts a value to an integer.
float - Converts a value to a float.
bool - Converts a value to a boolean.
and - Logical AND.
or - Logical OR.
not - Logical NOT.
in - Checks if a value is in a sequence.
not in - Checks if a value is not in a sequence.
len - Gets the length of a sequence.
range - Creates a sequence of numbers.
slice - Gets a slice of a sequence.
lambda - Creates an anonymous function.
```
Java - Singly Linked Lists and the `isEmpty()` method
Tags: java, singlylinkedlist, dsa, datastructures
Published: 2023-08-26 17:27:41

Hello Dev.to enthusiasts! 🌟

Let's talk data structures. Ever been in a situation where you're not sure if you're working with something, or... well, nothing? That's the quandary our singly linked lists often find themselves in. Enter: the `isEmpty()` method.

### A Quick Refresher: Singly Linked List 📖

First, let's remember what a singly linked list looks like:

```java
class Node {
    int data;
    Node next;

    Node(int data) {
        this.data = data;
        this.next = null;
    }
}

class SinglyLinkedList {
    Node head;
    SinglyLinkedList() {
        this.head = null;
    }
}
```

Each node in this structure has some data and points to the next node. If there's no next node, it points to `null`.

### The Core of Today's Discussion: `isEmpty()` 🎯

The `isEmpty()` method is simple, but vital:

```java
public boolean isEmpty() {
    return head == null;
}
```

This method checks if the `head` of our list is pointing to anything. If it isn’t (i.e., it's pointing to `null`), then our list is, indeed, empty. 

### Why It Matters 🤷‍♂️

Why is this method so important? Before performing operations on your list, you'd ideally want to know if you're dealing with actual nodes or if you're just about to interact with a void. It's a safety measure that helps prevent issues down the road and, let's face it, those dreaded `NullPointerExceptions`.

### Conclusion 🌅

While the `isEmpty()` method may seem basic, it's foundational to working with singly linked lists effectively. Understanding it ensures that we're always on the right track, working with data that's present rather than chasing shadows.

In [`the next article`](https://dev.to/hunorvadaszperhat/java-understanding-the-singly-linked-list-counting-nodes-with-size-16dm) we will look at size() method


Cheers and happy coding! 🚀
Day 11/100- Seizing Opportunities, Even on Busy Days
Published: 2023-08-26 17:26:12

Hello everyone,

Day 11 of this coding journey has taught me the value of seizing opportunities, no matter how busy the day might be. 🌟

Today, my schedule took me outside for most of the day, and I returned home quite late. Despite the limited time, I was determined to keep up with my coding commitment. So, I tackled two basic C++ problems on HackerRank.

This experience reminded me that it's not about the quantity of time, but the quality of effort we put into our coding journey. Even on hectic days, finding those pockets of time to code can make a significant difference.

So, whether the day is full of adventures or responsibilities, remember that every coding step counts. Here's to embracing every opportunity and making the most out of each moment.

Stay inspired,
Sivaraghavi
Day 10: Balancing Learning and Progress
Published: 2023-08-26 17:24:43

Hello everyone,

Day 10 of this coding journey has been a day of balancing priorities and making progress. 🚀

The majority of my time today was dedicated to catching up on my AI cyber security course, addressing a few backlogs along the way. It's a reminder that sometimes, learning takes precedence, and it's important to manage our commitments effectively.

Despite the focus on the course, I also managed to dive into some coding challenges on HackerRank. It's refreshing to switch gears and put my coding skills to the test, even after a day of intensive learning.

Life is a constant juggling act, and it's all about finding the right balance. Tomorrow holds new opportunities for learning, growth, and further coding adventures.

Keep learning and coding on,
Sivaraghavi U.R.
Building Scalable Web Applications with Django and PostgreSQL
Tags: postgres, postgressql, django, webdev
Published: 2023-08-26 17:22:38

1. **Introduction**
   - Brief overview of Django and PostgreSQL and their importance in web application development.
   - Discussing the benefits of using Django and PostgreSQL together for building scalable web applications.

2. **Setting Up the Development Environment**
   - Installation of Django and PostgreSQL.
   - Configuration of Django settings to connect to the PostgreSQL database.

3. **Database Modeling with Django**
   - Exploring Django's Object-Relational Mapping (ORM) and how it simplifies database modeling.
   - Creating models and defining relationships between them.
   - Migrating the models to create database tables in PostgreSQL.

4. **CRUD Operations with Django and PostgreSQL**
   - Implementing Create, Read, Update, and Delete operations using Django's ORM and PostgreSQL.
   - Demonstrating how to perform database queries and manipulate data.

5. **Scaling Django and PostgreSQL**
   - Discussing strategies for scaling Django and PostgreSQL to handle increased traffic and data volume.
   - Exploring techniques like database sharding, caching, and load balancing.

6. **Deployment and Best Practices**
   - Deploying the Django application to a production environment.
   - Identifying best practices for optimizing performance, ensuring security, and maintaining the application.
What is Blockchain? (Blockchain_Post_04)
Tags: blockchain, web3, ledger, transctions
Published: 2023-08-26 17:13:49

What is Blockchain?
;
ব্লকচেইন হল একটি ডিস্ট্রিবিউটেড লেজার টেকনোলজি (DLT) যা নিরাপদ (secure) এবং স্বচ্ছ (transparent) পদ্ধতিতে লেনদেন (transctions) রেকর্ড করতে ব্যবহৃত হয়। এটি এমনভাবে তথ্য রেকর্ড করার একটি সিস্টেম যা সিস্টেমটিকে পরিবর্তন করা, হ্যাক করা বা প্রতারণা করা কঠিন বা অসম্ভব করে তোলে।
;
ব্লকচেইনের প্রতিটি ব্লকে অনেকগুলি লেনদেন (transctions) থাকে এবং যতবারই ব্লকচেইনে একটি নতুন লেনদেন (transctions) হয়, সেই লেনদেনের একটি রেকর্ড প্রতিটি অংশগ্রহণকারীর লেজারে যোগ করা হয়। এইভাবে, প্রত্যেকের কাছে সর্বদা সমস্ত ক্রিপ্টোকারেন্সি লেনদেনের (transctions) একটি up-to-date record থাকে।
What is a decentralized Ledger? (Blockchain_Post_03)
Tags: decentralized, ledger, blockchain, web3
Published: 2023-08-26 17:12:04

What is a decentralized Ledger?
;
A decentralized ledger is a database that is maintained by multiple nodes in a network. This means that there is no single point of control or failure, and the ledger is more resistant to attack or manipulation.
;
একটি decentralized ledger হল তথ্য রেকর্ড করার এমন একটি সিস্টেম যেখানে এটি নিয়ন্ত্রণ করার জন্য কোন নির্দিষ্ট ব্যক্তি বা সংস্থা নেই , যেখানে control, power, authority and decision-making কে নির্দিষ্ট কোন ব্যক্তি বা সংস্থার কাছে না রেখে Network এ সংযুক্ত সকলের মাঝে সমান ভাগে ভাগ করে দেওয়া ।
;
decentralized ledger এ তথ্য গুলো একবার input করা হয়ে গেলে সিস্টেম পরিবর্তন করা, হ্যাক করা বা প্রতারণা করা কঠিন বা অসম্ভব ।
What is Decentralized? (Blockchain_Post_02)
Tags: blockchain, decentralized, fintech, decentralization
Published: 2023-08-26 17:10:28


Decentralization হল এমন এক প্রক্রিয়া যেখানে control, power, authority and decision-making কে নির্দিষ্ট কোন ব্যক্তি বা সংস্থার কাছে না রেখে Network এ সংযুক্ত সকলের মাঝে সমান ভাগে ভাগ করে দেওয়া হয়।
how to create like this tab content item in wordpress?
Tags: wordpress, programming, website, html
Published: 2023-08-26 17:08:52

https://www.mql5.com/en/signals/1766488?source=Site+Signals+MT5+Tile#!tab=history

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/86i4eea8jadz81f6i0hp.png)
Hit Club - Tải game Hit Club mới nhất cho Android/iOS
Published: 2023-08-26 17:08:23

Hit Club là một cổng game bài trực tuyến thú vị và đa dạng, hứa hẹn mang đến cho bạn những giờ phút giải trí tuyệt vời. [Đăng ký nhận 50k]
Website :    https://hitclub2.vip/
Địa chỉ : 2 Giải Phóng, Phường 4, Tân Bình, Thành phố Hồ Chí Minh, Việt Nam
Hotline : 0975843167
Email :        hitclub2vip@gmail.com
Hastag : #hitclub #hit_club

https://about.me/hitclub2vip

https://www.linkedin.com/in/hitclub2vip/

https://twitter.com/hitclub2vip

https://www.reddit.com/user/hitclub2vip

https://www.pinterest.com/hitclub2vip/

https://www.flickr.com/people/hitclub2vip/

https://www.youtube.com/@hitclub2vip/about

https://www.tumblr.com/hitclub2vip

https://dribbble.com/hitclub2vip/about

https://sketchfab.com/hitclub2vip

https://tapas.io/hitclub2vip

https://replit.com/@hitclub2vip

https://www.instapaper.com/read/1629236300

https://hub.docker.com/u/hitclub2vip

https://www.diigo.com/profile/hitclub2vip

https://www.twitch.tv/hitclub2vip/about

https://linkhay.com/u/hitclub2vip

https://en.gravatar.com/hitclub2vip

https://gab.com/hitclub2vip

https://www.openstreetmap.org/user/hitclub2vip
Learn to disable font scaling in React Native app.
Tags: react, reactnative, design
Published: 2023-08-26 17:07:59


**Introduction**

In this post we will look into how we can disable font scaling in your react native application. So recently in one of the apps I am working on, the text size in the android version in one of the tester's device was bigger than usual and the design became extremely unstructured and out of bounds. So when investigating the issue, I found out that the end user has increased the size of the font in their settings. So in order to overcome this issue the proposed solution was to disable font scaling and revert it back to one which will retain the font size according to whats being given in the app code. So lets take a look on how we can achieve this in both android and iOS.

**Code for android**

Go to MainApplication.java in the android folder and add the following code,

```jsx
import android.util.DisplayMetrics;
import android.view.WindowManager;

@Override
  public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
    initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
    adjustFontScale(getResources().getConfiguration());
  }

  private void adjustFontScale(Configuration configuration) {
    configuration.fontScale = (float) 1.0;
    DisplayMetrics metrics = getResources().getDisplayMetrics();
    WindowManager wm = (WindowManager) getSystemService(WINDOW_SERVICE);
    wm.getDefaultDisplay().getMetrics(metrics);
    metrics.scaledDensity = configuration.fontScale * metrics.density;
    getBaseContext().getResources().updateConfiguration(configuration, metrics);
  }
```

**Code for iOS**

Go to index.js and add the following code at the bottom of the page.

```jsx
if (Text.defaultProps == null) {
  Text.defaultProps = {};
  Text.defaultProps.allowFontScaling = false;
  TextInput.defaultProps = TextInput.defaultProps || {};
  TextInput.defaultProps.allowFontScaling = false;
}
```
For more clarity on where to place the code, you can view the following video for more clarity.

{% embed https://www.youtube.com/embed/jgr_BpM3nKg?si=EFpEXoRb8xjAHtOr %}

**Conclusion**

This was a short post, but this will save you a lot of time and retain the text size and design proportions in people's devices who have set their font size to be above the default level. To get to learn more about react and react native you can view my course in Udemy to improve your knowledge revolving around frontend and mobile app development.

https://www.udemy.com/course/react-native-for-absolute-beginners-with-react-hooks/
What is Ledger? (Blockchain_Post_01)
Tags: blockchain, ledger
Published: 2023-08-26 17:03:12


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/63ect8m36ua3h58156yh.jpeg)## What is Ledger?

;

The book which contains a classified and permanent record of all the transactions of a business is called the ledger.

;

Ledger হল এমন একটি বই / খাতা যেখানে ব্যবসায়ের সকল লেনদেনের শ্রেণীবদ্ধ হিসাব স্থায়ী ভাবে record করা হয়ে থাকে । Ledger মূলত commerce (Accounting) sector এর একটি উপাদান ।

;

In cryptography technology, a ledger is a distributed database that records all cryptocurrency transactions. It is a secure and transparent way to track ownership of cryptocurrency.

;

“Ledger” ব্লকচেইন প্রযুক্তির একটি মূল উপাদান। ব্লকচেইন হল তথ্য রেকর্ড করার একটি সিস্টেম, যা সিস্টেম পরিবর্তন করা, হ্যাক করা বা প্রতারণা করাকে কঠিন বা অসম্ভব করে তোলে।

Cryptography Technology তে Ledger ব্যবহার করার কিছু সুবিধা উল্লেখ করা হলঃ

Security: cryptocurrency transactions সংরক্ষণ এবং track করার নিরাপদ মাধ্যম হল Ledger. Ledger Cryptography Technology দ্বারা সুরক্ষিত, যা Hack বা পরিবর্তন করা কঠিন বা অসম্ভব ।

;

Transparency: Cryptocurrency Transactions কে transparent way তে track করতে ledger ব্যাবহার করা হয় । Network এর প্রত্যেকেরই Ledger Access রয়েছে, তাই লেনদেনের (transactions) সত্যতা যাচাই করা সহজ।

;

Scalability: Ledger প্রচুর পরিমাণে লেনদেনের (transactions) জন্য scale করা যেতে পারে। এটি high-volume applications গুলিতে ব্যবহারের জন্য উপযুক্ত ।

;

Efficiency: Ledger হল cryptocurrency লেনদেন (transactions) সংরক্ষণ এবং track করার একটি কার্যকর উপায়। এর জন্য central authority এর প্রয়োজন নেই, যা সময় এবং অর্থ বাঁচাতে পারে।

;

সামগ্রিকভাবে, Ledger একটি Powerful Tool / Technology যা cryptocurrency লেনদেনগুলিকে (transactions) সুরক্ষিত এবং track করতে ব্যবহার করা যেতে পারে। এটি ব্লকচেইন প্রযুক্তির একটি মূল উপাদান এবং cryptocurrency শিল্পের বৃদ্ধির জন্য অপরিহার্য।
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qzxwjtc4ufk2u5obog0q.png)
OpenAPI Browser Editor - Free Developer Tool
Tags: openapi, node, design, showdev
Published: 2023-08-26 17:00:08

Hello Folks!

So the other day my company wanted me to edit our huge open api spec. I gave it a shot found I was painstakingly slow at it because it was just so big.

I searched the internet but could not find a tool that gives a wow factor.

Long story short I spent 7 days to built a tool called [Frogment](https://www.frogment.com). A typo of fragment. 

The whole purpose of the tool is to make your editing simpler an easier.


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

## ✨ Product features

👉 It is Free
👉 Three Pan layout for multiple spaces
👉 Supports multiple spaces
👉 Realtime Fast linting
👉 DRY using a new idea `code_blocks`. Documentation to be added
👉 Auto complete search your schemas 

### [Visit Frogment](https://www.frogment.com)