teleren/devto huggingface dataset:
Dynamic index: src/app/routes/index.ts
Tags: webdev, beginners, tutorial, typescript
Published: 2023-12-13 04:45:26

##=> src/app/routes/index.ts

```ts
import { Router } from 'express';

const router = Router();

const moduleRoutes = [
  {
    path: '/pathname',
    route: routername,
  },
];

moduleRoutes.forEach((route) => router.use(pathname.path, routername.route));

export default router;
```
Factors to consider when selecting an inventory management software development company?
Tags: inventree, webdev, softwaredevelopment, opensource
Published: 2023-12-13 04:38:08

When selecting an inventory management software development company, several critical factors should be considered to ensure that the chosen company aligns with your business requirements and provides a reliable solution. Here are the key factors to consider:

## **1.1. Industry Experience and Expertise**

Evaluate the company's experience in developing inventory management systems.
Consider if they have previously worked with businesses in your industry.
Look for specialized expertise in inventory control, logistics, and supply chain management.

## **1.2. Customization and Scalability**
Assess the company's capability to customize software to meet your specific business needs.
Ensure the software can scale as your business expands without compromising performance.

## **1.3. Features and Functionality**
Review the software's features and functionalities. Ensure it covers essential aspects like inventory tracking, order management, real-time updates, reporting, etc.
Check if the software offers automation capabilities, barcode scanning, multi-location management, etc.

## **1.4. User Interface and Ease of Use**
Test the software's user interface for its intuitiveness and ease of navigation.
Consider user experience to ensure it's accessible and understandable for your team members.

## **1.5. Integration and Compatibility**
Verify if the software can seamlessly integrate with your existing systems like ERP, CRM, accounting software, etc.
Ensure compatibility across various devices (desktop, mobile) and operating systems.

## **1.6. Support and Maintenance**
Inquire about the company's support services, including implementation assistance, training, ongoing technical support, and regular maintenance.
Ensure they provide adequate resources and timely assistance in case of issues or updates.

## **1.7. Data Security and Compliance**
Evaluate the software's security measures, including data encryption, user authentication, access controls, and backups.
Check if the software complies with industry regulations and standards (GDPR, HIPAA, etc.).

## **1.8. Cost and ROI**
Understand the pricing structure, including initial costs, licensing fees, ongoing support charges, and potential additional expenses for customization or upgrades.
Calculate the potential return on investment (ROI) based on the software's features and benefits.

## **1.9. Reviews and References**
Read reviews and testimonials from other businesses using their software.
Request references from the company to speak with their existing clients about their experiences.

Considering these factors will help you make an informed decision when selecting an inventory management software development company in Vietnam that best suits your business needs and goals.

[Discovery at](https://www.aegona.com/software-development/advantages-and-disadvantages-upgrading-inventory-management-system)
My Junior Achievement Finance Park Experience
Published: 2023-12-13 03:05:40

## The Week Before the Trip

The excitement for the upcoming school trip to Junior Achievement Finance Park had been building up all week. To prepare, we delved into the world of finance using a dedicated notebook. Topics ranged from distinguishing between credit and debit cards to uncovering the mysteries of government taxes. Little did I know how valuable these lessons would become?

## How We Were Arranged to Go

The day finally arrived, and we gathered in the school cafeteria, ready for an adventure in financial literacy. Each student signed in on a paper, and after the official check-in, we were sorted into different groups. I found myself in Group M, surrounded by fellow eager learners.

## How We Went

Boarding three separate buses, the journey to Junior Achievement Finance Park began. I lucked out as my friend shared the same bus, ensuring a journey filled with chess games and Wordle challenges. The excitement was palpable as we neared our destination.

# What Was It About

Upon arrival, we discovered a round center with tables lining the walls, each hosting different stands representing companies like Toyota, CVS, Publix, Amazon, and more. Our mission? Navigate through these stands, choose a job, and manage taxes and expenses based on our simulated income.

## The Stands That I Saw

I explored various stands, each offering a unique perspective on financial responsibilities:

**Publix:** Managed a budget to purchase ingredients for a meal. (Note: My culinary skills were put to the test, but alas, no finished meals.)

**Toyota:** Arranged car cards to simulate the car-buying process. No right or wrong way, just an optical and prepared approach.

**Universal:** Engaged in a quiz about insurance and jobs, and regretfully missed out on the hurricane simulator.

**NSU:** Solved riddles about different jobs, particularly enjoying the aqua biologist section.

**Amazon:** Participated in Kahoots about cloud technology how Amazon manages its information, and the roles of technology in modern-day business.

## Summary of What I Learned at the End

The job that caught my attention was the Computer Data Analyst position at Amazon, offering an average annual salary of $74,600 (forgive any inaccuracies). With this income, we had to solve all of our taxes and expenses. After meticulously managing my finances, I found myself with a surprising $100 in spare funds. While unexpected, it reinforced the importance of budgeting and financial planning.

In conclusion, this trip left me feeling more confident about handling expenses, budgets, and taxes—although the budgeting part was **TOTALLY** not learned through culinary expertise ha, ha(ironic laugh). However, my previous experience at the [KubeCon+CloudNativeCon trip in Chicago](https://dev.to/angeljrp/my-adventure-at-kubecon-a-techie-teens-take-on-the-tech-universe-3cjo) played a good role. The Junior Achievement Finance Park experience was not only educational but also a fun and interactive way to explore the world of finance.
Harness the power of multiple LLMs 🤝
Tags: ai, opensource, machinelearning, tutorial
Published: 2023-12-13 04:13:16

When dealing with LLMs like GPT-4, PaLM2, etc., we can often get varying outputs. This begs the question - how can we easily assess what the actual output is given these varied responses? 

![spiderman](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rz57mqabkp10dx1q8yx3.jpeg)

This is where a chain-of-thought prompting comes into play. By passing the same prompt across different LLMs, we can use them to verify and enhance the accuracy of the final output. In the example, we show here we use "marjority-vote / quorum" amongst the responses to determine the final output. You can of course use other heuristics as well. The idea is inspired by the principles outlined in the "Self Consistency" paper, which looks at how sampling a diverse set of reasoning paths from a single language model can improve consistency.

## How to use multiple LLMs in seconds 🤖

AIConfig steps in as the orchestrator to easily coordinate your prompts against multiple LLMs without having to wrangle with the different APIs and providers. 

1. **Prompt each LLM**: We send out the same single prompt from the AIConfig to several LLMs to get various reasoning paths. With a simple, `config.run` and setting the model name for the prompt template, you're able to get your desired output across several models. 
2. **Evaluate Responses**: AIConfig then uses GPT-4 (or any other model you set up) to determine a quorum—basically, a majority vote on the best response.

The benefits? You get enhanced accuracy and a safety net in case one LLM hallucinates and produces the wrong output!

🎁 Template for Multi-LLM Consistency: https://github.com/lastmile-ai/aiconfig/tree/main/cookbooks/Multi-LLM-Consistency 

⭐️ We recently launched AIConfig as our first open-source project. Please support us with a star ⭐️ on Github!
https://github.com/lastmile-ai/aiconfig/tree/main
2023 C# Advent – What’s New in Entity Framework Core 8
Tags: development, video, c, cadvent
Published: 2024-01-25 20:24:33

---
title: 2023 C# Advent – What’s New in Entity Framework Core 8
published: true
date: 2023-12-13 04:00:00 UTC
tags: Development,Video,C,CAdvent
canonical_url: https://barretblake.dev/2023/12/2023-c-advent-whats-new-in-entity-framework-core-8/?utm_source=rss&utm_medium=rss&utm_campaign=2023-c-advent-whats-new-in-entity-framework-core-8
---

This video is my contribution to the [2023 C# Advent event](https://csadvent.christmas/). It’s a highlight of some of the cool new features available in Entity Framework Core 8. Be sure to check out all the other contributions!

<iframe title="2023 C# Advent - What's New in Entity Framework Core 8" width="640" height="360" src="https://www.youtube.com/embed/CRsU23iq7tY?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

The post [2023 C# Advent – What’s New in Entity Framework Core 8](https://barretblake.dev/2023/12/2023-c-advent-whats-new-in-entity-framework-core-8/) first appeared on [Barret Codes](https://barretblake.dev).
分析TextQuery的源码
Published: 2023-12-13 03:30:36

首先我们看下各个文件中的成员变量和成员函数都是做什么的。可以针对这个画一个类图。
### get_print
一共三个函数get_file、get_word还有get_words。
#### get_file 
这个函数，就是判断一下传参对不对，然后把文件传给TextQuery这个类进行进一步处理。
#### get_word
输入一个词，如果是q的话退出
#### get_words
输入两个词，如果第一个词是q的话退出，如果第一个词不是q的话再出入第二个词。

### TextQuery
RegEX: Anchors
Tags: regex, cheatsheet
Published: 2023-12-13 03:29:47

| Pattern | Description |
| --- | --- |
| `\G` | Start of match |
| `^` | Start of string |
| `$` | End of string |
| `\A` | Start of string |
| `\Z` | End of string |
| `\z` | Absolute end of string |
| `\b` | A word boundary |
| `\B` | Non-word boundary |

> ## Useful links
> - [Create Online cheatsheet](https://simplecheatsheet.com/)
> - [RegEX Cheatsheet](https://simplecheatsheet.com/regex)
Adobe Photoshop: Use Curves
Tags: adobephotoshop, cheatsheet
Published: 2023-12-13 03:29:45

| Shortcut | Action |
| --- | --- |
| `Ctrl` `M` | Open the Curves dialog box |
| `+` | Select next point on the curve |
| `-` | Select the previous point on the curve |
| `Ctrl` `D` | Deselect a point |
| `Del` | Delete a point on the curve |
| `Arrows` | Move the selected point 1 pixel |
| `Shift` `Arrows` | Move the selected point 10 pixels |

> ## Useful links
> - [Create Online cheatsheet](https://simplecheatsheet.com/)
> - [Adobe Photoshop Cheatsheet](https://simplecheatsheet.com/adobe-photoshop)
LaraCP Free Laravel CRUD Prototype Generator
Tags: laravel, laravelcodegenerator, laravelscaffolding, freecodegenerator
Published: 2023-12-13 03:26:05

```

```
Hi Artisans,

I am a freelance FullStack Developer. I had created a free platform named LaraCP. 

[https://laracp.com](https://laracp.com)

Purpose of this platform is to generate Laravel CRUD Code based on the input provided for 

> **The models,**
> **Model fields**
> **Model field properties and validations** and 
> **Model relations**.


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

It reduces the time for the project which has to be done in Laravel and are supposed to be built from scratch.

**It generates:** 
 **All Models** (Data and multi auth guard models)
 **All Web + API Controllers** (web, api, web-auth, api-auth including all auth guards)
 **Roles and Permissions for User Model** (Super Admin)
 **CRUD Views for all models** (show will be empty you can use it the way you want it has all the data variables associated with it.)
 **All Form requests** (store and update) with all validations specified during configuring models.
 **All Resource Collections for API endpoint outputs.**
**All Resource File for API endpoint outputs.**
 **All Factory Files.**
**All Migrations.**
 **Updated** `config/app.php` with all multi guards.
 **Updated** `web/routes.php` with all multi guards.
 **Updated** `api/routes.php` with all multi guards.


**Help Videos:**
_How to create project:_ 
[https://www.youtube.com/watch?v=RegoSTo3JFI](https://www.youtube.com/watch?v=RegoSTo3JFI)

_How to manage model fields and their properties and valiations:_
[https://www.youtube.com/watch?v=0bAIRkM_eLM&t=26s](https://www.youtube.com/watch?v=0bAIRkM_eLM&t=26s)

_How to Generate Output:_
[https://www.youtube.com/watch?v=ZkqNQEwOK0Q](https://www.youtube.com/watch?v=ZkqNQEwOK0Q)

I understand the help videos generate are not that professional, but I am working on to make better videos, so to get head started you guys can refer these videos. Will put up better videos soon 👍. 

Please explore the platform and let me know how it is. Please share your feedback and suggestions to make it better.

Happy Coding 👍👍
Want to Know the Type of Database that Google, Facebook, LinkedIn, and PayPal use?
Tags: neo4j, graphdatabase, speedydatabase, emileifrem
Published: 2023-12-13 02:47:00


![Graph Database](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1msfhxsfrsut6q1kjad0.png)

Well, that's a graph database. In 2000, a company named Neo Technologies created a graph database. According to the CEO, Emil Eifrem - creator of Neo4j - the major challenge they faced during the early years of graph database was marketing.

Nevertheless, the database Eifrem created is literally lit! It uses a graph structure for semantic queries. But nodes, edges, and properties to store data. Now, in this database, the graph is crucial. It also relates data items to nodes and edges - relationships between nodes are referred to as edges.

Additionally, it is also called NoSQL. And like NoSQL, it lacks schemas. The model is also easy to change and flexible. Now, a graph database is somewhat similar to a network model database. How? Well, both have general graphs.

But how does a graph database work? Well, both data and relationships between data are treated the same way. In fact, the related nodes are connected. This connection is also considered data.

What's the upside of this? Well, modeling data this way allows people to question or query the relationships in the same way they question the data. Further, rather than calculating the connection steps, a graph database reads the relationship from storage. It's also quick and responsive when it comes to complex queries.

Now, where does a graph database work best? Well, where there's a need for master data management and regulation compliances, it works the best. This is because there's a lot of data, and since a graph database creates a graph, it becomes easy to track data. It's also effective in monitoring and managing digital documents like contracts, etc.

Also, the relationships between the graphs are clear and detailed. The queries of the database provide real-time outputs. Moreover, the more relationships there are in a graph database, the faster its speed. It's also the best and most powerful database to use when there's interconnected data.

It can support queries while giving real-time data updates. However, the downside is there isn't a specific query language in graph databases. Whatever platform is used, the language of that platform is employed. It's also not the best database for transactional-based systems. In fact, for a transactional system, a relational database is more suitable. This is because it has tables to efficiently store data and perform transactions.

Another con of graph databases is their small user base. Since not many people use it because they are quite expensive, support is minimal.
Apuntes Django
Published: 2023-12-13 02:34:35

## Clase Meta en los modelos:
Se usa para proporcionar metainformación y controlar la forma en como se devuelven o envian los datos.

- **Ordenar los resultados que se devuelven**(`ordering`):
En una consulta como `MiModelo.objects.all()`, los resultados se ordenarán alfabéticamente por el campo campo1.

```
class MiModelo(models.Model):
    campo1 = models.CharField(max_length=50)
    campo2 = models.IntegerField()

    class Meta:
        ordering = ['campo1']  # Ordenar resultados por campo1 de forma ascendente
```
- **Personalizar nombre de la tabla**(`db_table`):
Esto cambiará el nombre de la tabla al nombre personalizado
```
class OtraTabla(models.Model):
    # campos del modelo

    class Meta:
        db_table = 'nombre_personalizado_tabla'

```
- **Restricciones de unicidad** (`unique_together`):
Se puede especificar el conjunto de campos que pueden ser únicos, por ejemplo:
```
class Persona(models.Model):
    nombre = models.CharField(max_length=50)
    apellido = models.CharField(max_length=50)

    class Meta:
        unique_together = ['nombre', 'apellido']
```
Esto también se puede hacer en cada campo de la siguiente manera: `email = models.EmailField(unique=True)`

- **Establecer un Nombre Singular Plural Personalizado**:
Puedes especificar un nombre plural personalizado para tu modelo. Sirve principalmente para el admin.

```
class Persona(models.Model):
    first_name = models.CharField(max_length=30)
    last_name = models.CharField(max_length=30)

    class Meta:
        verbose_name = "Persona"
        verbose_name_plural = "Personas"
```
- **Modelos para ser heredados por otros Modelos**(`abstract = True`):
Cuando creamos un modelo para que sea heredado por otros modelos,es decir que queremos que otros modelos compartan sus campos.

```
class UnpaperWorkModel(models.Model):
    # Campos comunes para varios modelos
    nombre = models.CharField(max_length=100)
    descripcion = models.TextField()

    class Meta:
        abstract = True

class ModeloEspecifico(UnpaperWorkModel):
    # Este modelo hereda los campos de UnpaperWorkModel
    campo_adicional = models.CharField(max_length=50)
```
Karaoke Queue, a web app for hosting karaoke parties.
Tags: showdev, webdev
Published: 2023-12-13 02:32:50

## Description 
I built a web app to use when I host karaoke in my building's theater room. This is not a tutorial, just an explanation of my project. I would, however, be happy to answer any questions or help anyone solve problems they may have when creating a Rails 7 app for hosting on Heroku.

## Requirements

1) For my own setup the laptop running the karaoke equipment uses Chromecast to display the karaoke video on a large projected screen, and bluetooth to play the music to a karaoke speaker with two microphones. The app needed to be accessible from each guest's phone for easy queueing of songs, therefore hosted and not just operating locally on the laptop running the karaoke equipment.

2) The app needed to queue songs with a user-input URL pointing to the location of a video karaoke version of a song. When a performer clicks the URL of the next song from the laptop, the app needs to mark that song as finished. I also anticipated that songs would need to be skipped/postponed in case a performer was not available in the moment to perform their song. 

3) A single user was sufficient for my own purposes, and I opted out of a traditional sign up to avoid managing users who might randomly access the hosted web app. This also allowed me to skip a lot of work that would be needed for a publicly accessible app, like validation of URLS or updating each logged in device's view with an implementation of ActionCable and Redis on Heroku. 

## Stack 
I used Rails 7 and Postgres for hosting on Heroku with minimal Javascript and Sass. I also used Devise, Haml, Html to Haml, and RSpec.

## Approach
I kept things as simple as possible in order to complete the project quickly. In all, it took me about four hours. 

1) I ran Rails new, set up initial gems, initialized a Git repository with a remote connection, and prepared the app for Heroku.

2) I implemented basic CRUD for a Song with additional features to finish a queued song upon click of its link and skip of a song upon the click of a button. 

3) I installed HAML and ran html2haml to convert all existing ERB files, based on a strong preference for HAML over ERB. I also use HAML on a daily basis professionally. 

4) I used Sass for styling of the app. I kept the overall styling pretty simple to allow for thorough styling of states including active, hover, etc and usage of SVG icons. 

5) I set up Devise to handle sign in of a single user. Devise will allow for future features, like using the invitable option to invite other users to the app. 

6) I used RSPEC for minimal initial testing of CRUD for songs. 

7) Last, I used ZeroSSL to create my own certificates, added them to the Heroku app, and set up a CNAME through my own domain provider in order to move from the Heroku app URL to www.karaoke.jaredharbison.com.

{%embed https://github.com/JaredHarbison/karaoke %}
10 Typescript utilities you need to know 🔥
Tags: typescript, webdev, frontend, tutorial
Published: 2023-12-13 01:57:17

In this article, i'm going to cover 10 typescript utilities every developer should know.

- Partial type
- Required type
- Readonly
- Pick
- Omit
- Record
- Exclude
- Extract
- NonNullable
- Return type


**1- Partial type**
```typescript
Type Person = {
  name: string;
  age: number;
  gender: string;
  address: string;
}
// Partial<T> type Partial sets all properties 
// of Person to optional
type PartialPerson = Partial<Person>;
```

**2-Required**
```typescript
// Required<T> all properties of `RequiredPerson` 
// are required
type RequiredPerson = Required<Person>;
```

**3-Readonly**
```typescript
// Readonly<T>: Creates a type with all properties
// of T set to readonly.
type ReadonlyPerson = Readonly<Person>;
```

**4-Pick**
```typescript
// Creates a type by picking only the specified
// properties K from T.
type PersonName = Pick<Person, 'name'>;
```

**5-Omit**
```typescript
// Omit<T,K> Creates a type by omitting the specified
// properties K from T.
type PersonWithoutAge = Omit<Person, 'age'>;
```

**6-Record**
```typescript
// Record<K,T> Creates a type with keys of type 
// K and values of type T.
type StringRecord = Record<string, Person>;
```

**7-Exclude**
```typescript
// Exclude<T, U>: Creates a type by excluding all types
// from T that are assignable to U.
// string is excluded from the union type
type NumbersOnly = Exclude<number | string, string>;
```

**8-Extract**
```typescript
// Extract<T, U> Creates a type by extracting all types
// from T that are assignable to U.
// string is extract from the union type
type StringOnly = Extract<number | string, string>;
```

**9-NonNullable**
```typescript
// NonNullable<T>: Creates a type by removing null and undefined from T.
// null and undefined are excluded from the union type
type NonNullString = NonNullable<string | null | undefined>;
```

**10-ReturnType**
```typescript
// ReturnType<T>: Obtains the return type of a function type.
type MyFunctionReturnType = ReturnType<MyFunction>;
```