teleren/devto huggingface dataset:
Unlocking Success with Smartkeeda LAWex: Your Ultimate CLAT Companion
Tags: clat, clatcoaching, onlineclatcoaching, lawex
Published: 2024-03-12 07:36:37

Are you aspiring to pursue a career in law? Do you dream of cracking the CLAT (Common Law Admission Test) with flying colors? Look no further, because Smartkeeda has got you covered with its revolutionary platform - **LAWex**.

LAWex, an integral part of the esteemed Smartkeeda website, is designed to be your one-stop solution for all things CLAT. Whether you're seeking comprehensive online coaching, rigorous mock tests, or insightful current affairs magazines, LAWex provides you with every study material necessary to excel in the CLAT examination.

## Why Choose Smartkeeda LAWex?


**1. Comprehensive Online Coaching:** With LAWex, you gain access to top-notch **[CLAT online coaching](https://testzone.smartkeeda.com/law/clat-online-coaching)** tailored specifically for CLAT aspirants. Our team of experienced educators has meticulously crafted course materials covering all sections of the CLAT syllabus. From legal reasoning to quantitative techniques, we ensure that you are thoroughly prepared to tackle every aspect of the exam.

**2. Extensive Mock Tests:** Practice makes perfect, and LAWex offers an extensive array of mock tests to help you sharpen your skills and gauge your progress. Our mock tests are designed to simulate the real CLAT exam environment, enabling you to familiarize yourself with the format and time constraints. With detailed performance analysis and feedback, you can identify your strengths and weaknesses, allowing for targeted improvement.

**3. Current Affairs Magazines:** Stay ahead of the curve with our curated collection of current affairs magazines. In the ever-evolving landscape of law and politics, staying informed is key to success. Our magazines cover a wide range of topics, including recent legal developments, landmark judgments, and socio-political issues, ensuring that you are well-equipped to tackle the current affairs section of the CLAT exam.
 
**4. One-Stop Solution:** With LAWex, you no longer need to juggle multiple resources. Everything you need for CLAT preparation is conveniently consolidated under one roof. Say goodbye to the hassle of searching for disparate study materials – LAWex streamlines the process, saving you time and effort.

**Join the Smartkeeda Community Today!**

At Smartkeeda, we are committed to empowering aspiring lawyers to achieve their dreams. With LAWex, we aim to provide you with the tools and support you need to succeed in the competitive world of law entrance exams.

So why wait? Join the Smartkeeda community today and take the first step towards unlocking your potential. With LAWex by your side, the path to CLAT success has never been clearer.
How would you implement user authentication and authorization in a MERN stack application?
Published: 2024-03-12 07:27:06

Implementing user authentication and authorization in a MERN stack application involves several steps and technologies. Here's a high-level overview of the process:

Database Setup: Start by setting up your MongoDB database to store user information securely. Create a collection to store user credentials, including usernames, hashed passwords, and any additional user-related data.

Backend Authentication: In the Node.js backend (using Express.js), implement routes and controllers to handle user authentication. Utilize libraries like bcrypt for hashing passwords and jsonwebtoken (JWT) for creating and verifying authentication tokens. When a user logs in, verify their credentials against the database, generate a JWT token, and send it back to the client for subsequent authenticated requests.

Frontend Integration: In the React.js frontend, create login and registration forms to capture user credentials. Upon submission, send the data to the backend for authentication. Store the JWT token securely (e.g., in local storage or cookies) to include it in subsequent API requests for authentication.

Protected Routes: Implement middleware on the backend to protect routes that require authentication. This middleware should verify the JWT token included in the request header and allow access to the protected resource only if the token is valid.

Authorization: Once a user is authenticated, implement authorization checks to restrict access to certain resources based on user roles or permissions. This could involve checking the user's role against predefined roles or querying the database for specific permissions associated with the user.

Session Management: Consider implementing session management techniques to handle user sessions securely. This could involve setting session timeouts, refreshing tokens, and handling token expiration gracefully.

Error Handling: Implement robust error handling mechanisms throughout the application to handle authentication and authorization errors gracefully. Provide informative error messages to users to aid in troubleshooting.

By following these steps and leveraging the appropriate libraries and best practices, you can effectively implement user authentication and authorization in your [MERN stack](https://www.infomazeelite.com/hire-mern-stack-developer/) application, ensuring secure access to resources and protecting user data.
Prevent over-fetching data for REST API in Ruby on Rails
Tags: rails, api, ruby
Published: 2024-03-12 07:26:49

 One of the main features of GrahpQL compared to the REST api - GraphQL APIs let clients query the exact data they need, while REST APIs just returns all data described in serializers.

While I prefer using REST API for my rails apps I tried to find solution for optimizing responses. I made some attempts with multiple serializers for different controllers and for the same models, but it leds to mess.

With using [jsonapi-serializer](https://github.com/jsonapi-serializer/jsonapi-serializer) I found solution.

Attributes of serializer can be optional with if and proc

```
class UserSerializer < ApplicationSerializer
  attribute :confirmed, if: proc { |_, params| required_field?(params, 'confirmed') }, &:confirmed?
  attribute :banned, if: proc { |_, params| required_field?(params, 'banned') }, &:banned?
end
```

During serialization such attributes will be or will not be serialized based on provided params.

Attribute will be serialized if it presents in include_fields or does not present in exclude_fields.

```
class ApplicationSerializer
  def self.required_field?(params, field_name)
    params[:include_fields]&.include?(field_name) || params[:exclude_fields]&.exclude?(field_name)
  end
end
```

And this is how part in controllers works

```
SERIALIZER_FIELDS = %w[confirmed banned].freeze
def index
  render json: {
    user: UserSerializer.new(
      current_user, params: serializer_fields(UserSerializer, SERIALIZER_FIELDS)
    ).serializable_hash
  }, status: :ok
end
```

Method serializer_fields generates hash with include/exclude attributes based on params and compares it with available attributes from serializer. Later that hash is used in serializer.

```
def serializer_fields(serializer_class, default_include_fields=[])
  @serializer_attributes = serializer_class.attributes_to_serialize.keys.map(&:to_s)
  return {} if response_include_fields.any? && response_exclude_fields.any?
  return { include_fields: response_include_fields } if response_include_fields.any?
  return { exclude_fields: response_exclude_fields } if response_exclude_fields.any?
  return { include_fields: default_include_fields } if default_include_fields.any?

  {}
end

def response_include_fields
  @response_include_fields ||= params[:response_include_fields]&.split(',').to_a & @serializer_attributes
end

def response_exclude_fields
  @response_exclude_fields ||= params[:response_exclude_fields]&.split(',').to_a & @serializer_attributes
end
```

This approach allows to achieve:

- preventing over-fetching data by REST API,

- tracking required attributes for responses (maybe some of them are not used at all),

- usually controller could have some .includes for optimization, and based on required attributes such optimizations/additional requests to DB can be skipped.

I hope this approach will help somebody with REST API optimization their Rails apps.
setw() & setfill() | C++ boshlang'ich
Tags: beginners, uzbek, dasturlash, cpp
Published: 2024-03-12 07:22:00

### `setw(n)`

- Ushbu funksiya chop etish uchun ma'lum uzunlik ya'ni ustunlar so'raydi. *Masalan: setw(5) - chop etish uchun 5 ta ustun so'raydi.*
- agar chop etilayotgan beliglar uzunligi so'ralgan ustunlar sonidan ko'p bo'lsa, hamma belgilar muammosiz chop etiladi. 
*Masalan: `cout << setw(1) << "Salom";` kodi garchi bitta ustun so'ralgan bo'lsa ham `Salom` so'zini hammasini chop etadi.*

```cpp
cout << setw(10) << 123 << endl; 
```

### `setfill('')`
- Ushbu fuknsiya `setw()` funksiya bilan doimo birgalikda ishlatiladi. 
- `setfill('')` funksiyasi `setw` ishlatilganda hosil bo'lgan bo'sh kataklarni berilgan belgi bilan to'ldiradi.
*Masalan: `cout << setw(5) << setfill('.') << 7 << endl;` kodi `....7` chop etadi.`
Creating Custom NuGet Packages in C#
Tags: csharp
Published: 2024-03-12 07:21:52

Creating custom NuGet packages in C# can be a useful way to share reusable code with other developers, whether within your organization or in the wider community. NuGet packages are a convenient way to package and distribute code, allowing other developers to easily incorporate your code into their projects.

To create a custom NuGet package in C#, first, you will need to create a class library project. This project will contain the code that you want to package into a NuGet package. Once you have created your class library project, you can add any classes, interfaces, or other code that you want to include in your NuGet package. 

Next, you will need to create a NuGet package specification file. This file, typically named `YourPackageName.nuspec`, contains metadata about your package, such as its name, version, description, dependencies, and author information. You can create this file manually or use tools such as `NuGet Package Explorer` to generate it.

Here is an example of a `YourPackageName.nuspec` file:

```xml
<?xml version="1.0"?>
<package>
  <metadata>
    <id>YourPackageName</id>
    <version>1.0.0</version>
    <authors>Your Name</authors>
    <owners>Your Name</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Your package description</description>
    <dependencies>
      <dependency id="AnotherPackageName" version="1.0.0" />
    </dependencies>
  </metadata>
</package>
```

Once you have created your class library project and `YourPackageName.nuspec` file, you can build your project to generate the `.nupkg` file, which is your NuGet package. You can then publish this package to a NuGet feed, either public or private, for other developers to consume.

To consume your custom NuGet package in another project, you can use the NuGet Package Manager in Visual Studio or the `dotnet` CLI tool. Simply search for your package, select it, and install it into your project.

Creating custom NuGet packages in C# can help you share your code with others, streamline development processes, and promote code reuse. Give it a try and see how it can benefit your projects!
（NowGoal）UEFA Champions League - FC Barcelona VS Napoli Prediction
Published: 2024-03-12 07:09:03


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cwvegcrpawb08bg4q11p.jpg)
UEFA Champions League - FC Barcelona VS Napoli
Match Time: 13-03-2024 04:00 Wednesday (GMT+8)
[Football Livescore](https://live1.nowgoal15.com/) | Match Prediction & Tips
----------------------------------------------------------
Given these observations, it seems the favor is tilted towards the Barcelona side. The expectation is that they will obtain a win in this game, at an appealing 1.85 odds. Besides, Barcelona netted 9 goals in their last four home performances, leaking 3. They have also scored at least 2 in three of the total four meetings with Napoli at this venue. Since Napoli has scored in a majority of their recent matches, a 2-1 score in favor of the host Barcelona side is plausible. Considering the above-mentioned goal trend, expect over 2.5 goals and both teams to score.

Pick: Over 2.5 goals & Both teams to score
Liman MYS Dağıtım Eklentisi ile Cihaz Ajanı Dağıtma
Tags: linux, tutorial, beginners, havelsan
Published: 2024-03-12 07:04:06

## Dağıtım Eklentisi Hakkında
Liman MYS Dağıtım eklentisi, **SSH** protokolü üzerinden **Linux** cihazlarınız üzerinde dosya gönderme, paket kurma ve betik çalıştırma işlemlerini kolayca yapabilmenize olanak sağlayar.

Bu yazımızda Dağıtım eklentisi ile Cihaz Yönetimi Ajanının dağıtımını gerçekleştireceğiz.

### 1- Dağıtım Sunucusu Seçilir, Dağıtım Eklentisine Girilir.

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

### 2- Sunucu Kimlik Bilgisi Ekleme
Sunucumuzun **Dağıtım Eklentisi**'ne girelim ve **Kimlik Bilgileri** alanını seçelim. Açılan ekranda dağıtım yapacağınız sunucu veya sunucularınızın SSH bilgilerini dolduralım.

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

**kimlik Bilgisi Oluştur** butonu ile yeni kimlik bilgisi oluşturup ekleyelim.

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

### 3- Cihaz Yönetimi Ajanı Dağıtım Betiğinin Eklenmesi

Betikler Sayfasında **Betik İçe Aktar** Butonuna basarak mico.sh betiğini sudo yetkisi ile seçelim.

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

Yükleme sonrası betikler sayfada listelenecektir.

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

### 4- Aksiyon Oluşturma
Aksiyonlar Sayfasında bulunan **Aksiyon Oluştur** butonuna basarak dağıtım yapacağımız sunucuları ve kimlik bilgilerini seçelim

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

Aksiyonlar sayfasında oluşturulan aksiyonun durumu gösterilecektir. Tamamlandığında ise başarılı ise **Tamamlandı**, başarız ise hata mesajı yazacaktır.

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

Yaptığınız Aksiyonların detayını sol köşede bulunan ok işaretine basarak detayları görebilirsiniz.

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


### 5- Sunucu Ekleme
Eğer tek bir cihaz üzerinde birden fazla işlem yapacaksanız sunucu olarak ekleyebilirsiniz. Böylece tek tıklama ile hızlı bir şekilde aksiyon oluşturabilirsiniz.  

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ickofxrvwtqjml47n9ki.png)
The Beginning of a Cloud Journey
Published: 2024-03-12 06:53:33

A few months ago, I started a journey into a new world in the Tech space - Cloud Computing. I've had quite an experience and knowledge of design basics with Figma, Web design (HTML, CSS, and JavaScript), and the MERN stack, of which CLOUD COMPUTING is a different one.

Thanks to AltSchool Africa, learning has indeed been impactful and valuable. I got the opportunity to learn with a community of like-minded people with vibrant goals which made helping one another possible and easier. I found this quote as a summary - "To go fast, work alone. To go far, work together."


Let me share some new buzz words in this field;

- Vagrant
- Ubuntu
- Linux Distros
- Sudo and Sudoer
- Apt and Yum
- Ansible
- VM and more...

The above words did not only birth a new knowledge in me, rather I learnt not just to define them, but know how to use them and bring them together to make things work.

"In Cloud Engineering, we give wings to your codes to fly". Come with me as I explore the cool things Cloud Computing can do!
Free Your Design: The Ultimate Guide to Iconbuddy
Tags: iconbuddy, icons, freeicons
Published: 2024-03-12 06:52:48

Have you ever spent hours scouring the internet for the perfect icon, only to come up empty-handed or face a paywall blocking your path?  We've all been there. But fret no more, fellow designers and developers, because there's a new hero in town: **IconBuddy**.



![Iconbuddy is a search engine that allows you to search, download, customize, and edit over 200,000 open source svg icons for free.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/le3co63edvw281pnvvot.gif) 

 
 

Iconbuddy isn't your average icon library. Think of it as a treasure trove overflowing with over 200,000 free, open-source SVG icons.  That's right, free as in "no credit card required" and open-source as in "modify and customize to your heart's content!"

Here's what makes Iconbuddy stand out from the crowd:

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


- **An Icon Odyssey:**
 Iconbuddy boasts a mind-boggling collection of icons, covering everything from basic shapes and social media icons to niche categories like science, healthcare, and even weather. No more Frankenstein-ing different icon styles together – Iconbuddy has a unified aesthetic that elevates your project.

- **From Stock to Bespoke:**
 Found an icon that's almost perfect, but the color throws off your whole vibe? No problem! Iconbuddy lets you download and customize any icon with ease. Change the colors, tweak the size, and make it truly your own.

- **Beyond the Basics:**
  Iconbuddy 2.0 goes beyond a simple icon library. It offers additional features like a logo maker to help you craft a stunning brand identity and SVG conversion tools to ensure your icons are compatible across platforms.

- **A Community that Grows:**
 The best part? Iconbuddy is part of a thriving open-source community. This means new icons and updates are constantly being added, keeping your design arsenal fresh and ever-expanding.

_Iconbuddy is more than just an icon library; it's a game-changer.  Stop wasting time hunting for the perfect icon and unleash your creativity with Iconbuddy. So, what are you waiting for? Head over to https://iconbuddy.app and start building something amazing!_
I'm making a huge database of recent LLM papers and repos
Tags: chatgpt, llm
Published: 2024-03-12 06:25:25


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oau5zixm5ps7nso1nxae.png)
We are creating a huge database of recent LLM papers and repos over 400 papers🔥
Let us know interesting papers
https://shure-dev.github.io/
Query Documents from PostgreSQL like MongoDB
Tags: news, programming, sql, postgres
Published: 2024-03-12 06:24:51

[BackLogic Data Access Service (DAS) is in beta!](https://www.backlogic.net/) 

Forget about ORM, query builder and raw SQL. BackLogic DAS lets you

- Query complex objects from PostgreSQL like from MongoDB; and
- Build your entire data access layer with not Java, C#, Python or TypeScript, but SQL Only.

Is this object below complex enough?

```json
[
    {
        "id": 10,
        "arr1": [
            {
                "id1": 1
            }
        ],
        "arr2": [
            {
                "id2": 2,
                "arr3": [
                    {
                        "id3": 3,
                        "val": "X"
                    }
                ]
            }
        ]
    },
    {
        "id": 20,
        "arr1": [
            {
                "id1": 2
            }
        ],
        "arr2": [
            {
                "id2": 4,
                "arr3": [
                    {
                        "id3": 6,
                        "val": "Y"
                    }
                ]
            }
        ]
    }
]
```

It is returned by a DAS query service using this single SELECT statement:

```sql
select 10 as id, 1 as id1, 2 as id2, 3 as id3, 'X' as val
union all
select 20, 2, 4, 6, 'Y'
```

Besides query service, BackLogic DAS also includes a repository service and a command service, both comprising only SQL and JSON elements but designed to handle objects of any shape.

[Check it out!](https://www.backlogic.net)
Total Image Group
Published: 2024-03-12 06:23:50

Total Image Group  is an Australian owned family business that designs and supplies fit for purpose and fashion forward uniforms. From custom uniforms and bespoke designs, to ready to wear work uniform solutions — we deliver the highest standard of quality from manufacture through to customer service. We are trusted by many of Australia’s most loved brands to create a uniform range that uplifts staff, increases morale and drives home a consistent brand message.

Custom Uniform Design and Consultation:  TIG 

If you’re a business where one size definitely does not fit all, here’s your chance to show the world. Unforgettable first impressions start with the right uniforms, and you can choose from:

Complete custom packages — when you want to weave your brand story into every uniform, customising gives you design freedom. From custom fabrics to designing bespoke brand pieces, the little details like coloured buttons, where you place the logo, an on-brand colour trim… they’re what create a uniform your people are proud to wear.

Specialised Uniform consultation — we build your brand uniform from our existing range, curating the right pieces with the little touches that make it your own. We know there is no one way of doing things which is why we offer our expert advice to ensure not only your uniform launch and roll out are a success, but the right support and processes are in place.

With a team of 40, we dress over 300,000 Australians every day across corporate, retail, healthcare, hospitality, automotive, fitness, industrial and beauty industries.

We’re proud of the history we’re creating, and we’d love to help create yours.

Contact Here:

Address: 40 Sydney St, Marrickville NSW 2204 Australia

Call Us: 1300 844 398

Visit Our Website:  https://totalimagegroup.com.au/
Nuxt.js: What is It and Its Benefits?
Tags: nuxt, webdev
Published: 2024-03-12 06:05:50

If you are someone who knows and works in Vue.js, then for you learning Nuxt.js would be a piece of cake.This is because Nuxt.js is built on top of the Vue.js framework. Moreover, by working on Nuxt.js, maybe you will be able to brush up your Vue.js skills. So, why not start working on Nuxt.js? But, wait. Why should you learn Nuxt.js? There are several advantages of using Nuxt.js that you won’t find in Vue.js. Before jumping into the introduction, let’s see what you can be able to make using Nuxt.js.

1. SSR apps
2. SPA
3. SSG

Moreover, nuxt.js generates Vue.js routes in the app depending on the folder structure — that too automatically. It also has a new set of data-hooks including fetch()hook and asyncData()hook. The former wasn’t present from the beginning in Nuxt.js. It was added in Nuxt.js 2.12+release. Further to start with Nuxt, you must have a Node js installed on your computer.

When it comes to working, Nuxt.js works similarly to a server-side framework. Actions or methods that are used in Nuxt.js include nuxtServerInit(Action), validate(), and asyncData(). Now, let’s move on and see what are the benefits of Nuxt.js.

Well, you can create apps without any hurdles in Nuxt.js. You see in Vue.js, due to countless configuration options, a lot of time developers will face problems on both the server and client sides. But, in Nuxt.js, the SSR feature is built. You will also have access to the isServer and isClient properties to gauge whether you’re rendering on the client side or server side.

Moreover, in Nuxt.js there’s a feature of automatic code splitting. This splitting feature also uses Webpack configuration that is built when a static version of a website is created. Apart from this, in Nuxt.js there is ES6/ES7 compilation as well the feature of hot reload.