teleren/devto huggingface dataset:
Building composable LLM applications with Java.
Tags: java, openai, ai, opensource
Published: 2023-04-19 14:44:05

Introducing Langtorch, a new and powerful library for building composable LLM (Large Language Model) applications using the Java programming language. Langtorch aims to provide developers with a robust and flexible framework to create LLM-based applications with ease.
The library is still in active development, and while it's not yet ready for production use, it's already showing a lot of promise in terms of its features and capabilities. Some of the key features implemented in Langtorch include:
Prompt Template and Annotation Based Prompt OpenAI LLM Provider Input and Output Parser Capability Unit, Capability Node, and Capability DAG Capability Agent Langtorch also has a roadmap for adding more features, such as providing more pre-built capability units and nodes, adding annotation-based LLM services, and implementing memory.
Langtorch is inspired by libraries like langchain, showcasing its commitment to building on existing foundations to create innovative and effective solutions.
For those interested in getting started with Langtorch, the library is available on Maven Central Repo, and while the documentation is still being worked on, it's a good place to start exploring this exciting new project.
Please note that Langtorch is still in active development and not ready for production use. Nonetheless, it's an exciting project that holds great potential for the future of LLM application development.
Check out the project on GitHub: https://github.com/Knowly-ai/langtorch
Angular Core Deep Dive
Tags: angular, angularcore, webdev, frontend
Published: 2023-04-19 14:25:54

Angular is a popular JavaScript framework for building web applications. At the core of Angular is the @angular/core module, which provides essential features for building Angular applications.

Let's take a deep dive into some of the key features of the @angular/core module and how they work with an example.

Component: The @Component decorator is used to define a component in Angular. A component is a reusable piece of code that defines the view and behavior of a part of the application. Here is an example of a simple component that displays a greeting message:

```
import { Component } from '@angular/core';

@Component({
  selector: 'app-greeting',
  template: `<h1>Hello, {{ name }}!</h1>`
})
export class GreetingComponent {
  name = 'Angular';
}

```

In this example, the @Component decorator is used to define a component with a selector of 'app-greeting' and a template that displays a greeting message with the name property.

Directive: The @Directive decorator is used to create a custom directive in Angular. Directives are used to add behavior to elements in the DOM. Here is an example of a directive that changes the background color of an element when it is clicked:

```
import { Directive, ElementRef, HostListener } from '@angular/core';

@Directive({
  selector: '[appHighlight]'
})
export class HighlightDirective {
  constructor(private el: ElementRef) { }

  @HostListener('click') onClick() {
    this.el.nativeElement.style.backgroundColor = 'yellow';
  }
}

```

In this example, the @Directive decorator is used to define a directive with a selector of '[appHighlight]' and a HostListener that changes the background color of the element when it is clicked.

Service: The @Injectable decorator is used to create a service in Angular. Services are used to share data and functionality between components. Here is an example of a service that retrieves data from an API:

```
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';

@Injectable({
  providedIn: 'root'
})
export class DataService {
  constructor(private http: HttpClient) { }

  getData() {
    return this.http.get('https://jsonplaceholder.typicode.com/posts');
  }
}

```

In this example, the @Injectable decorator is used to define a service with the providedIn: 'root' option, which makes the service available throughout the application. The service uses the HttpClient module to make a GET request to an API and return the data.

Overall, the @angular/core module provides essential features for building Angular applications, including components, directives, and services. By using these features, developers can create reusable and maintainable code that makes it easier to build complex web applications.

Any Queries and Question please comment.

Thank You for reading 😊
The Commerce and MACH Landscape: Staying Ahead of the Game
Tags: microservices, api, cloudnative, headless
Published: 2023-04-19 14:15:57

The commerce and MACH (Microservices-based, API-first, Cloud-native, [Headless](https://en.wikipedia.org/wiki/Headless_computer)) landscape is constantly evolving, and keeping up with the latest trends is crucial for any company looking to remain competitive in this space. As a developer or tech enthusiast, it's important to stay up-to-date with the latest developments and be aware of what your competitors and peers are doing. 

Here are some of the best resources and websites available to help you stay on top of the latest trends in commerce and MACH.

[Gartner](https://www.gartner.com/en/newsroom/topics/information-technology) is a research and advisory company that offers insights into various industries, including commerce and MACH. They publish research reports, host events, and offer advisory services that can help you stay informed about the latest trends. Gartner's research is respected and valued across the industry, making it a great source for reliable information.

[Forrester](https://www.forrester.com/allSearch?query=mach&s=relevance&dateRange=365) is another research and advisory company that offers insights into the commerce and MACH landscape. They publish reports and offer advisory services that can help you stay up-to-date on the latest trends and best practices. Forrester has been in the industry for many years and is well-respected, making it a valuable resource.

[TechCrunch](https://techcrunch.com/) is a popular technology news website that covers a wide range of topics, including commerce and MACH. They publish news articles, feature stories, and analysis pieces that can help you stay informed about the latest trends and developments. TechCrunch's articles are always engaging and thought-provoking, making it a fun resource to follow.

[Insider Intelligence](https://www.insiderintelligence.com/) is a market research company that offers insights into various industries, including commerce and MACH. They publish reports and offer advisory services that can help you stay up-to-date on the latest trends and best practices. Insider Intelligence's reports are highly regarded and offer valuable insights into consumer behavior and industry trends.

[CMSWire](https://www.cmswire.com/) is a website that covers news and trends related to content management systems (CMS), digital customer experience, and marketing technology. They publish articles and analysis pieces that can help you stay informed about the latest trends and best practices in commerce and MACH. CMSWire's articles are informative and easy to understand, making it a great resource for beginners.

In conclusion, staying up-to-date on the latest trends in the commerce and MACH landscape is crucial for any company looking to remain competitive in this space. By regularly checking these resources and websites, you can stay informed about the latest trends and position your company for success. So, stay ahead of the game and keep exploring the latest developments in commerce and MACH!
Session about postman
Tags: postman
Published: 2023-04-19 13:58:27

The session was held by Joel Jaison. The session started by giving an introduction on what an API is and what are its uses. He introduced API with real life examples so that I can catch it easily. Then he also explained to us to use Postman and how to use Postman to test APIs. We started by creating an account in postman.Then we got introduced about rapidapi. Then we had a practical session on how to test and use APIs using postman from RapidApi. We used API of our own choice and performed various operations like GET,POST etc.  We had practical session on it too where we added data of a student into database using the "POST" method and retrieved it using "GET" method. We did the same thing adding data of a book into the database and retrieving it.I didn’t know anything about postman earlier.But now I was able to get a basic idea on APIs and how to test them on Postman.  the session was really fruitful and informative.
Resolvendo problemas no HackerRank: Vagas na linha de Serviço
Tags: javascript, beginners, programming
Published: 2023-04-19 13:54:01

Olá, seja bem vindo a mais um Resolvendo problemas no HackerRank: No caso de hoje, iremos analisar as vagas de uma estrada e dar o resultado do número de vagas possíveis. Vejamos mais informações com a explicação e sua resolução.

**Service Lane -**

Um motorista está dirigindo na rodovia. A luz de verificação do motor de seu veículo está acesa e o motorista deseja obter o serviço imediatamente. Felizmente, uma faixa de serviço corre paralela à rodovia. Varia em largura ao longo do seu comprimento.

Você receberá uma matriz de larguras em pontos ao longo da estrada ( índices ) e, em seguida, uma lista dos índices de pontos de entrada e saída. Considerando cada par de pontos de entrada e saída, calcule o tamanho máximo do veículo que pode trafegar com segurança naquele segmento da faixa de serviço.

Exemplo

- n = 4
- largura= [2, 3, 2, 1]
- casos = [[1, 2], [2,4]]

Se o índice de entrada, i = 1 e a saída, j = 2, existem dois segmentos larguras de 2 e 3, respectivamente. O veículo mais largo que pode passar por ambos é 2. Se i = 2 e j = 4, as larguras são [3, 2, 1], o que limita a largura do veículo a 1.

Nosso objetivo: é a achar largura máxima do veículo que pode passar por cada segmento da faixa de serviço descrita

Confuso? Veja a tabela a seguir,acredito que com ela seja mais simples a compreensão:


8 5                 n = 8, t = 5
2 3 1 2 3 2 3 3     width = [2, 3, 1, 2, 3, 2, 3, 3]
0 3                 cases = [[0, 3], [4, 6], [6, 7], [3, 5], [0, 7]]
4 6
6 7
3 5
0 7

Saída:

1
2
3
2
1

Mas porquê esses resultados? Veja:

0: |       |--|            2
1: |       |---|           3
2: |       |-|             1
3: |       |--|            2
4: |       |---|           3
5: |       |--|            2
6: |       |---|           3
7: |       |---|           3

- (0,3): Do índice 0 a 3, temos as larguras 2, 3, 1 e 2. Nada maior que 1 pode passar por todos os segmentos.
- (4, 6): Do índice 4 ao 6, temos as larguras 3, 2 e 3. Nada mais largo que 2 pode passar por todos os
- segmentos.
- (6,7): 3, 33.
- (3, 5): 2, 3, 22
- (0,7): 2, 3, 1, 2, 3, 2, 3, 3 → 1.

Vejamos então uma forma de encontrar o resultado máximo que pode passar em cada uma das larguras, veja o algoritmo javaScript a seguir:

// Neste código,foi necessário fazer um alteração na linha let result = serviceLane(n, cases) e mudar para: let result = serviceLane(width, cases);  e também alterar os parâmetros da função para os descritos a seguir:

```
function serviceLane(n, cases) {
    // Write your code here
  const arr = [];
    for (let item of cases) {
        arr.push(Math.min(...n.slice(item[0], item[1]+1)));
    }
    return arr;
}
```

O código cria uma const que terá um array vazio e cria um lanço de repetição onde dentro terá uma variável chamada `item` e dentro do `arr`vazio, ele lança o menor valor dentro dos dois index dentro de item, e logo após retornamos o `arr`com o menor valor. 


O resultado será:

```
1
2
3
2
1
```

Assim, concluímos mais um _Resolvendo problemas no HackerRank:_ até a próxima.
Contract work in software development
Published: 2023-04-19 13:52:21

Dave Lucia, a well known person in the Elixir community of practice, posted this tweet:

{% twitter 1648450360787484675 %}

> Friends who do contract work:
> How do you track your hours?
> Do you have a minimum time slice that you track by?
> How do you keep track of tasks that you’re billing?
> This is all new to me, and using a Notion table feels a bit cumbersome 
> All tips appreciated 🙏

There are several interesting answers there:

- "If it's just you, pencil and paper. Seriously. And whenever it's billed throw it away. Keep it simple without adding cumbersome tools. Buy a nice pencil." 
- "Longtime [Freshbooks](https://www.freshbooks.com/) user here. Does everything I need without getting in the way."
- "I use [timingapp.com](https://timingapp.com/?lang=en)"
- "For me tracking anything in increments less than an hour is a nightmare. I’m TERRIBLE at tracking time though. I’ve used many tools for it (mostly [Toggl](https://toggl.com/)) but they’re all so similar. I’ve always wanted to try a physical device like 
[Timeular](https://timeular.com/tracker/)."
- "I had a Google sheet that I logged everything into (daily hours) and then invoiced every 2 weeks. Not too tricky that way!"
- And more. Some people suggested using [Harvest](https://www.getharvest.com/features).

As I do not work as a contractor, I decided to ask "ChatGPT Mar 23 Version" (which says that it is a "Free Research Preview" and that "ChatGPT may produce inaccurate information about people, places, or facts.") the same questions. My prompt was:

> I have a few questions about contract work in software development.
> How do developers track their hours?
> Do they have a minimum time slice that they track by?
> How do they keep track of tasks that they are billing?

ChatGPT's answer was:

> Developers who work on a contract basis typically track their hours using time tracking software or tools. There are many different time tracking tools available, including Toggl, Harvest, RescueTime, and many others. These tools typically allow developers to track the time they spend on specific tasks or projects, and can generate detailed reports that can be used for invoicing clients.

> In terms of minimum time slices, this can vary depending on the developer and the client. Some developers may track their time in 15-minute or 30-minute increments, while others may track their time in smaller or larger increments. The minimum time slice that a developer tracks by will typically be determined by the client's requirements and any contractual agreements that are in place.

> To keep track of tasks that they are billing, developers may use project management software or tools. These tools can help developers organize their work, track their progress, and ensure that they are completing tasks on time and within budget. Project management tools can also be used to generate invoices and track payments, making it easier for developers to manage their finances and ensure that they are being paid for their work.
POSTMAN WORKSHOP
Tags: postmanapi, postman
Published: 2023-04-19 13:44:06

On yesterday 18/04/23 i attended my first ever workshop on api that was organized in our college by postman workshop.we learnt about the basic structure and building block of an api and was very much keen to learn from the session. Overall the workshop was a fruitful one.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wypojooi6766088khrzo.jpg)
Understanding the Different Features and Functionalities of Magento
Tags: magento, dotnet, hiredevelopers, magentodevelopment
Published: 2023-04-19 13:38:00

Magento is a powerful e-commerce platform that has become popular among businesses worldwide. It is known for its robust features and functionalities that enable businesses to create high-performing, customizable, and scalable online stores. In this blog post, we will discuss the different features and functionalities of Magento and why you should consider to **[Hire Magento developers](https://www.webcluesinfotech.com/magento-development-services)** for building your online store.

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

**1. Catalog Management:** Magento offers advanced catalog management features that allow businesses to manage their products and categories easily. It offers various tools to create and manage product attributes, categories, and pricing rules, making it easier to manage a large number of products.

**2. Order Management:** Magento offers an easy-to-use order management system that allows businesses to manage their orders efficiently. It provides features like order tracking, shipment management, and order editing, making it easier to manage and fulfill orders.

**3. Payment and Shipping Options:** Magento offers a variety of payment and shipping options, making it easy for businesses to manage their transactions. It supports popular payment gateways like PayPal, Stripe, and Authorize.Net, and provides various shipping options like flat rate, table rate, and free shipping.

**4. Multi-Store Management:** Magento offers multi-store management features that allow businesses to manage multiple stores from a single dashboard. It allows businesses to create and manage multiple storefronts, each with its own unique branding and product offerings.

**5. SEO-Friendly:** Magento is built with SEO in mind, offering various features and functionalities to improve website visibility in search engine results pages (SERPs). It offers customizable URLs, meta tags, sitemaps, and other SEO-friendly features to help businesses optimize their website for search engines.

**6. Mobile-Friendly Design:** Magento offers responsive design and mobile-optimized features to provide a seamless user experience across devices. It allows businesses to create a mobile-friendly website that is optimized for mobile users.

In conclusion, Magento offers a range of powerful features and functionalities that enable businesses to create high-performing, customizable, and scalable online stores. To get the most out of Magento, businesses should consider hiring Magento developers who have the expertise and experience to build a successful online store. At WebClues Infotech, they offer expert **[Magento development services](https://www.webcluesinfotech.com/magento-development-services)** to help businesses build a custom e-commerce store that meets their specific needs. Contact them today to learn more about how they can help you build your online store.
Session on Postman and APis
Tags: postman, postmanapi, postmanstudent
Published: 2023-04-19 13:36:48


The session was held by Joel Jaison, One of our seniors. The session started with a brief introduction on what an API is and what are its uses. Joel took real life examples to portray how an API works and what are its uses in real life. He also explained to us to use Postman and how to use Postman to test APIs. At first we set up our accounts in Postman. We were then introduced to a site called "RapidApi". Joel explained to us that this is a site that provided APIs. Then we had a practical session on how to test and use APIs using postman from RapidApi. We were told to choose an API of our own choice and we tested it on Postman. Then we worked on various HTML methods like "GET", "POST" etc. We had practical session on it too where we added data of a student into database using the "POST" method and retrieved it using "GET" method. We did the same thing adding data of a book into the database and retrieving it. Personally I didn't know anything about APIs and Postman. I was able to get a basic idea on APIs and how to test them on Postman. Also got an idea on how to implement HTML methods. Overall the session was really fun and informative.
Breaking the language barrier: the role of english for software developers and methods for improving
Tags: remote, skills, developers, english
Published: 2023-04-19 13:24:23

In today's globalized world, #communication and collaboration are crucial, and #English is the lingua franca of the #software_development industry. ☝
This article highlights the advantages of English fluency for #developers and provides insights into how mastering the language can enhance your technical #skills and career growth opportunities.😉 
Don't miss out on this [informative read](https://devler.io/blog/breaking-the-language-barrier-the-role-of-english-for-software-developers-and-methods-for-improving)!
When to use forward slash in file path?
Tags: webdev, html
Published: 2023-04-19 13:23:21

_You might ask, Why am I writing this blog?
Because I recently struggled for like hours. While building my [capstone project 2](https://github.com/DevDuckling/Capstone-Project-2), everything was going fine locally but when I merged my branch to main and checked site on Github pages then nightmare began. My responsive web app suddenly became static web app(links were not working, image were broken and on clicking DevDuckling it was showing '404') I messed up in file paths of links and images_

I will quickly explain when you do not need and need to use `/` and `../` 
In below will be the example code, I have used my favorite anime characters as file names.

![files](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5w6dom8q15o5vj11aapl.jpg)

So Makima wants to have Naruto's picture in her file. She would look for path which is above current folder. Then she might use `../`

```
<section>
<h1>../ means file is present in (one level above or above current folder)</h1>
<img src="../naruto.jpg" alt="naruto">
</section>
```
Now Makima wants to have Jiraiya's picture in her file. She would look for path which is on root file(top level). Then she might use `/`

```
<section>
<h1>/ is top most level that is root file</h1>
<img src="/jiraiya.jpg" alt="jiraiya">
</section>
```
In VS code press `ctrl + space` key gives you suggestions that is helpful. 

Thank-you for reading this blog! I will try to write next blog soon and forgot to mention it was my first blog to dev.to haha. If anyone has suggestions, happy to apply on next blog! As every famous creator says react, comment, share and follow. Happy codding!
Torch Package for R
Tags: datascience, rlanguage, tutorial, beginners
Published: 2023-04-19 13:21:49

In this post, we take a look at the Torch package for R. 

This package is emulating the PyTorch framework for deep learning. However it's area of focus is bringing the deep learning in the R language. 

I created a video that covers the basics of the Torch package. You can take a look at it below. 

{% embed https://www.youtube.com/watch?v=rlTQR4xN8_g %}

Let's briefly cover some of the basics. 

You can install the packages shown below. 

> install.packages("torch")

Check if the CUDA is available. 

> cuda_is_available()

and then use :

> torch_tensor(1, device = "cuda")

Then you can create a tensor based on the available CUDA device. 

Let's create a tensor from the R objects. 

> library(torch)
> x <- array(runif(8), dim = c(2, 4, 6))
> y <- torch_tensor(x, dtype = torch_float64())
> y

That's it for a brief example. You would find the whole process video documented in the video linked above. You should give it a try. From there onwards you can check some of the examples out there in the kaggle for inspiration. 

I hope this helps anyone who is trying to learn the data science and exploring the dataset on their own.