teleren/devto huggingface dataset:
Laravel 8 Order By Query Example
Tags: laravel, mysql, php, database
Published: 2022-09-19 05:54:32

In this article, we will see laravel 8 order by query example. how to use order by in laravel 8.The orderBy method allows you to sort the results of the query by a given column. The first argument accepted by the orderBy method should be the column you wish to sort by, while the second argument determines the direction of the sort and may be either asc or desc.

Also, we will see an example of laravel 8 order by with where clause and query of order by in MySQL or multiple order by in one query. The ORDER BY keyword sorts the records in ascending order by default. To sort the records in descending order, use the DESC keyword.

So, let's see how to use order by in laravel 6, laravel 7, and laravel 8 or laravel 8 order by with where clause.

SQL Query of Order By

- Laravel orderBy
- Laravel orderBy Multiple
- Laravel orderBy Date Desc
- Laravel orderBy with Relationship
- Laravel orderBy with Limit
Use My Linux Laptop as Bluetooth Speaker
Tags: linux, fedora
Published: 2022-09-19 05:35:44

I use my linux laptop as a bluetooth speaker, here are the configuration steps.

Step 1 – Search Bluetooth Linux drivers

```
dnf search pulseaudio-module-bluetooth
```

Step 2 – Installing Bluetooth Linux drivers to stream audio from Android / iOS

```
sudo dnf install pulseaudio-module-bluetooth
```

Step 3 – How to configure Linux to send sound through Bluetooth

```
sudo nano /etc/pulse/system.pa
```
Append the following directives:

```
### Adding bluetooth audio streaming on Linux - Oct/14/2020 ###
load-module module-bluetooth-policy
load-module module-bluetooth-discover
```

Step 4 – Restarting the Bluetooth service on Linux

```
## Kill a running daemon on Linux ##
$ pulseaudio --kill
## Start the daemon if it is not running ##
$ pulseaudio --start
```

Step 5 – Pair your Android / iOS mobile phone with your computer

![bluetooth device](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hqk4ez1pww3rk0juzzcv.png)

Done, now you can stream from mobile phone.

---

## reference

- [cyberciti.biz](https://www.cyberciti.biz/mobile-devices/linux-set-up-bluetooth-speaker-to-stream-audio-from-your-android-ios-mobile-phone/)
Open Source Development - Release 0.1
Tags: opensource
Published: 2022-09-19 01:55:03

Hello!

I created SSG tool that allows you to conver txt files into html. I was unable to fix some issues yet, but planning to make it better in the future. (https://github.com/mnosov622/simple-ssg1).

A static site generator is a tool that generates a full static HTML website based on raw data and a set of templates. Essentially, a static site generator automates the task of coding individual HTML pages and gets those pages ready to serve to users ahead of time. Because these HTML pages are pre-built, they can load very quickly in users' browsers.

It was a great feeling to build something on your own. I think the most important outcome from open source to get is that you have to learn to get the right information on the internet, it's not that easy due to huge amount of information out there, but you have to google it right to get what you want :)

Sometimes, it gets you down, when you don't know how to fix an issue, but the way you think is very important here: if you say I haven't fixed it yet, your mind is open to any ideas and you keep trying until you make it, but once you say I can't fix this issue, you are just hiding from everything.

## How to use the tool:

## Options

Run --help or -h to display the usage information

Run --version or -v to display the tool name and version

Run simple-ssg1 [name of the file] to conver file from txt to html.

## Examples: 

1. simple-ssg1 ./content (convert all files inside content folder into html)

2. simple-ssg1 silver-blaze (upper case or lower case, will convert single file into html)

## Implemented features:

1. Added default stylesheet file

2.When user specifies a folder (./content) tool will convert all files inside this folder into html files and create home page.

**Last words. It's always hard to get out from your comfort zone, b but we need to do it in order to develop ourselves.**
No Sound After Update Fedora 36
Tags: linux, fedora
Published: 2022-09-19 05:18:21

After I update my fedora 35 to fedora 36 I can't use my external bluetooth speaker because I can't switch output audio, my bluetooth speaker doesn't show in the output device.

![audio problem](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p0fjrcktft2lc6mevumw.png)
I searched and solved it with this.

```
sudo dnf swap wireplumber pipewire-media-session
```
after that, my bluetooth speaker is shown in the output device.

![audio fix](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z95jpujxc4o2qc7zxrio.png)

---

## reference

- [ask.fedoraproject.org](https://ask.fedoraproject.org/t/fedora-35-no-sound-output-to-usb-audio-interface-after-software-updates/18293)
Need your feedback about: Which marketing channel did you focus on building Website traffic?
Tags: feedback, marketing, traffic, website
Published: 2022-09-19 05:06:51

Last week we release a new version of ManualsRepo.com. Our product is launched about 1 year ago, but it's not growing. What is a marketing channel we can focus on? (Medium, Social Media or SEO, ProductHunt...)

What ManualsRepo does:

1. Collect a ton of manuals (user guide, documents, installation guide) and organize them.
2. Extract data from PDF files and make it easy for users to find information.
3. Help users download document manuals fastest and more accurately.

I'll appreciate your feedback, thank you so much.

Website: [https://manualsrepo.com](https://manualsrepo.com)
Console Command Manuals: [https://manualsrepo.com/command](https://manualsrepo.com/command)
Install and Customize The Live Sass Compiler
Tags: vscode, sass, scss, css
Published: 2022-09-19 05:02:58

#### Install
**step 1:** Go to vscode and find the extension named "Live Sass Compiler", which is now maintained by Glenn Marks at the time of writing this article.

![Live Sass Compiler extension](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fontumsm8myl0piquc5i.jpg)

**step 2:** At the very bottom of the vscode, click on Watch Sass. If any case, you don't find Watch Sass, then go to .scss file (not partial scss file ) and you will able to click on Watch Sass.

![watch sass](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x4emnqpw2bnaay1nus7f.jpg)

#### Customize 
On vscode editor, press `ctrl + shift + p`
On search bar, type open setting
then click on
preference: open user setting(JSON) and you will be in settings.json file.

![open settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/23kbo0jhdd4sxfevg6as.jpg)

In the settings.json, put the following code very last of the json.

```
"liveSassCompile.settings.formats": [
    //by default generate css in root directory
    {
      "format": "expanded",
      "extensionName": ".css",
      "savePath": null,
      "savePathReplacementPairs": null
    },
    
    //generate compressed css 
    {
      "format": "compressed",
      "extensionName": ".min.css",
      "savePath": null,
      "savePathReplacementPairs": null
    },
    
    // generate css in another folder named css
    {
      "format": "expanded",
      "extensionName": ".css",
      "savePath": "/css",
      "savePathReplacementPairs": null
    }
  ]
```
![settings json](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a3qepukauyhbvevhq96x.jpg)

For more effectiveness, use [live server extension](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) on vscode.

HAPPY😃 CODING👩‍💻 !!!
Flutter Clean Architecture with bloc | Project Structure | Extension + Plugin
Tags: flutter
Published: 2022-09-19 04:57:35

**Nowadays, Clean Architecture becoming the most popular structure for building a modular, scalable, maintainable, and testable application.**

In this video, I’ll explain Flutter Clean Architecture and Project Structure. I’ll cover:
1. What is Flutter Clean Architecture?

2. Why do you use clean architecture?

3. An awesome extension & plugin to get a high-paying job.

4. Project Structure.

Grab it today to get high paying job: [Watch](https://youtu.be/ez9nYyG9Tmg)

Follow me on [GitHub](https://github.com/hprity60). Thanks for reading the article.
how do I redirect/call an react API in a html page?
Tags: react
Published: 2022-09-19 04:48:21

0


I did a calendar using FullCalendar.io API and want to call it in an html page, I put this in html page and doesnt work

<div class="app-calendar"></div>

 <script
 src="https://unpkg.com/react@16/umd/react.production.min.js"
 crossorigin
 ></script>
 <script
 src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"
 crossorigin
 ></script>

 <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>

 <script type="text/babel" src="/src/App.tsx"></script>

 <script type="text/babel">
 ReactDOM.render(<App/>, document.querySelector(".app-calendar"));
 </script> 
My react is in a whole function called app, how can i call the entire function not just one method

my react fullcalendar code

https://codepen.io/ttlfimql-the-vuer/pen/GRdmOmj
Setup of spring boot application & initialization of PostgreSQL database on Kubernetes
Tags: kubernetes, springboot, docker, postgres
Published: 2022-09-19 04:17:29

Detailed blog on how to setup a spring boot based application with PostgreSQL as database and steps to initialize it during start up

[https://belowthemalt.com/2022/09/18/setup-of-spring-boot-application-initialization-of-postgresql-database-on-kubernetes-part-1/](https://belowthemalt.com/2022/09/18/setup-of-spring-boot-application-initialization-of-postgresql-database-on-kubernetes-part-1/)

[https://belowthemalt.com/2022/09/18/setup-of-spring-boot-application-initialization-of-postgresql-database-on-kubernetes-part-2/](https://belowthemalt.com/2022/09/18/setup-of-spring-boot-application-initialization-of-postgresql-database-on-kubernetes-part-2/)
How To Change/Install Font In VS Code Editor (Windows)
Tags: beginners, vscode, codenewbie, tutorial
Published: 2022-09-19 04:17:10

{% youtube zIGYCFD-8Nw %}
Visual Studio Code is the most popular and the first choice among developers in terms of a code editor. 
We spent hours in VS code, and we may grow tired and bored of looking at the same font that VS code provides by default. 
Changing a font could help you, like better code vision, focus, and a fresh look.
So, let's see how to change or install a font in VS Code (windows).

## Requirements:
1. Visual Studio Code - Download **[Here](https://code.visualstudio.com/download)**
2. Windows PC

## 1. Downloading Font
![Google Fonts](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ves09a11m96483p9q5et.PNG) We will start by downloading the font for our code editor. You can download any of your favorite fonts but make sure that it is in the [Monospace](https://en.wikipedia.org/wiki/Monospaced_font) font category (although not mandatory).
Some of the popular font websites are:
- [Google Fonts](https://fonts.google.com/)
- [DaFont](https://www.dafont.com/)
- [FontSpace](https://www.fontspace.com/)

## 2. Installing Font
![Lato Font Installation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r407k3hcqubq1ltwqday.PNG) Once you have downloaded and extracted a Font file, you can select your desired weight file and click on it. You will see a preview screen with each character. Just click on Install, given at the top left corner.

## 3. Check Installation
![Font Settings Menu](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pm5mp5bhl64704nu8qc8.PNG) To check if the font is installed or not, you have to go to the font settings menu. To do so, press the **windows key** and search **font settings**. You should see the font settings shortcut, click on it.
Search for the font you have just installed. If you see the font, you are good to go! If not, try re-installing it and then restart your PC.

## 4. Add Font to VS Code
![VS Code Settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vrazvikf4ccpsvzy8utm.PNG) Open VS code and goto settings. You can go to settings by pressing **Ctrl + ,** together or by clicking **File > Preferences > Settings**.
In Font Family input field, type the font family name you just installed at the very start from the given font family names and then press **Ctrl + S** to save the changes.

## 5. Enable Font Ligatures
![settings.json file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8p22uc88modi2v71avih.PNG) If you are using some special font, then you might also want to enable the font ligature option in your code editor. To do so, again go to settings and search **font ligatures** in the search field or you can also click **Text Editor > Font > Font Ligatures**.
Click **Edit in settings.json**, a settings.json file should open.
Just change **`"editor.fontLigatures": false,`** to **`"editor.fontLigatures": true,`**

That's it!
If you still not seeing the changes, then just restart the VS code editor or restart your PC.

Thank you for reading! ❤
Office 365 Backup: 7 Reasons Why You Need It
Published: 2022-09-19 04:15:02

In 2011, Microsoft launched its cloud-based service, Microsoft Office 365. This product aimed to improve user communication and collaboration efficiency. Simply put, it allowed companies to manage their data in the cloud. Eleven years later, the number of Office 365 company users worldwide has now reached 1 million users.

Data backup is a crucial aspect of a company’s data protection strategy. It prevents data loss and ensures business continuity. But as companies move to cloud computing, they are revisiting their data protection strategies to address the new challenges.

In this article, we settle the misconception among organizations about how much control they retain over their Office 365 cloud data and who is responsible for its safety. We will also explore why Office 365 data backup is still necessary and critical for your business.


Source:[https://themerex.net/wp/office-365-backup-7-reasons-why-you-need-it/](https://themerex.net/wp/office-365-backup-7-reasons-why-you-need-it/)
609. Leetcode solution in Java
Tags: java, beginners, productivity, programming
Published: 2022-09-19 04:11:11


```
class Solution {
  public List<List<String>> findDuplicate(String[] paths) {
    List<List<String>> ans = new ArrayList<>();
    Map<String, List<String>> contentToFilePaths = new HashMap<>();

    for (final String path : paths) {
      final String[] words = path.split(" ");
      final String rootPath = words[0]; // "root/d1/d2/.../dm"
      for (int i = 1; i < words.length; ++i) {
        final String fileAndContent = words[i]; // "fn.txt(fn_content)"
        final int l = fileAndContent.indexOf('(');
        final int r = fileAndContent.indexOf(')');
        // "fn.txt"
        final String file = fileAndContent.substring(0, l);
        // "fn_content"
        final String content = fileAndContent.substring(l + 1, r);
        // "root/d1/d2/.../dm/fn.txt"
        final String filePath = rootPath + '/' + file;
        contentToFilePaths.putIfAbsent(content, new ArrayList<>());
        contentToFilePaths.get(content).add(filePath);
      }
    }

    for (List<String> filePaths : contentToFilePaths.values())
      if (filePaths.size() > 1)
        ans.add(filePaths);

    return ans;
  }
}

```

#leetcode
#challenge
here is the link for the problem: 
https://leetcode.com/problems/find-duplicate-file-in-system/
How to Configure your New Rails API to Use PostgreSQL
Tags: rails, postgres, beginners
Published: 2022-09-19 04:07:13

## Create a new Rails API and configure it to use PostgreSQL

Since learning Ruby, Ruby on Rails and PostgreSQL I recently learned that Rails will default to other SQL variants installed on my machine first like SQLite which I used in a recent project before moving on to PostgreSQL. 

I'm sure I'm not the only one out there who didn't make sure that their Rails database wasn't configured to use Postgres automatically so I did some digging around to make this post to show you how to just that in 2 easy steps.

## Step 1
Make your project folder and `cd` into it.

```
mkdir example-app
cd example-app
```

## Step 2
Create the Rails backend with a PostgreSQL database using this command: 

```
rails new my-example-app --api --database=postgresql
```

## Bonus
After `cd`ing and running `bundle install` in your new rails folder you're free to set up things like git if you want your work all in one repo. You can set up your React frontend in a subfolder with: 

```
npm install --prefix client
```

Now you will never have the issue of wondering if you're using anything other than PostgreSQL for your Rails app! However the real work of actually building the Rails app has just begun but you can pat yourself on the back for getting this task done.
Webinar on Challenges of Multi-cluster Kubernetes Management and Operations
Tags: kubernetes, technology, datacente, webinar
Published: 2022-09-19 03:48:29

Date: October 6th, 2022 Time: 5 P.M. IST Duration: 1 Hour Mode: Zoom [(Details after registration)](https://hubs.la/Q01mzcv20)

Kubernetes has become a mainstream data center technology in modern IT infrastructure in the last few years. Adoptors have realized a reduction in time-to-market due to the managing, automating, portability, and scaling capabilities of Kubernetes for containers.

Typically, applications are deployed on a single cluster in one environment. Over time, large enterprise applications are needed to deploy in multiple clusters in distributed environments to tap opportunities that emerged due to new use cases. The resulting multi-cloud environment is complex and requires an additional layer to efficiently manage the operations of clusters and hosted applications.

Arif Khan and Prabhjot Singh Sethi will discuss the key aspects of multi-cluster Kubernetes management adoption that will ensure the faster go-to-market using containerization initiatives in this webinar:

What is Multi-cluster Kubernetes? Needs and potential use cases.
What are Day 0, Day 1, and Day 2 Kubernetes Cluster Operations?
Kubernetes management challenges while managing thousands of clusters hosted in different environments
¿Qué es JavaScript?
Tags: javascript, beginners, programming, tutorial
Published: 2022-09-19 03:43:30



**## ¿Qué hace JavaScript?**
JavaScript es el responsable del funcionamiento de tu página web. Eso significa que JavaScript da vida a los distintos elementos HTML y a los estilos CSS en la web. Mira este vídeo para ver algunos ejemplos de JavaScript:

Si estás pensando aprender JavaScript, vas a ver rápidamente que hay muchos frameworks de JavaScript populares (es decir, código público que puede ayudarte a tener éxito). ¡Los frameworks pueden ser algo muy guay una vez que empiezas a aprender! Pero al inicio, pueden resultar abrumadores.
AWS VPC - Mind Mapping PDF
Published: 2022-09-19 03:42:21

Hello,

I love MindMapping, for me it the most easy way to learn a new topic.

This MindMap it's free to download. I use it and helped me to get the AWS Certification. 

If you are trying to study for the certification or just need to learn everything around AWS VPC, it should help you too.

[Download Link](https://www.bitslovers.com/mindmap-aws-vpc
)
Want to know about units of measure in CSS and how they relate to font sizes?
Tags: css, design, html
Published: 2022-09-19 03:40:41

I am an old guy that once read **a lot** about font sizes, GDI, GDI+ and related topics because I wanted to create (and did) a WYSIWYG control for a Visual Basic 6 project I had many, many years ago.  My first hard copies printed in a laser printer were sooo hilarious!  Sooo, sooo SOOOOO small!  LOL.  It was fun.

Anyway, time took me down the path of backend services and only recently did I have to brush up on a topic that vaguely ressembled what I had to learn so many years ago:  The design of a pill button for a **ReactJS** application.  Seeing all those units of measure, and making the design scalable as the font size changed (or zoom in the browser) made me realize there's still value to some of that knowlegde I acquired so long ago.

Let me know by liking or commenting if you would like me to write something up.  I can even pass down my learnings on how to make a perfectly scalable web component design.

Cheers.
Can non browser app use OAuth application code grant type
Tags: oauth, authorizationcode, webdev, api
Published: 2022-09-19 03:03:33

We have a requirement to call Snapchat APIs from the non-browser application. These APIs use OAuth for authentication with a grant-type authorization code.

This grant type needs a redirect URI to authenticate with an external application and generate a code that can be used to create tokens.

We don't have a redirect URI as ours is a non-browser application that needs to pull(GET) data from Snapchat.

How do we generate tokens as we don't have to redirect URI? Is the autoriation_code grant type suitable for non-browser-based applications?

Refer Snapchat API Specifications for token generation: https://marketingapi.snapchat.com/docs/#user-auth-via-redirect
Questions about SvelteKit?
Tags: svelte, sveltekit, beginners, discuss
Published: 2022-09-19 02:24:29

I'll be streaming this Wednesday, September 21st, at 5pm UTC with @jamesqquick!

{%embed https://twitter.com/nickytonline/status/1571675189951307777 %}

We'll be discussing all things [SvelteKit](https://kit.svelte.dev/) and building out something fun. Come join the stream and ask us some questions or just hangout!

What questions do you have about SvelteKit or what features are you most excited about? Drop them in the comments and/or ask them on the stream.

Give a follow so you don't miss the stream or just add this to your calendar [https://livecoding.ca/schedule?segmentID=1d4ac232-0503-4c0b-8db6-745582ad63b0](https://livecoding.ca/schedule?segmentID=1d4ac232-0503-4c0b-8db6-745582ad63b0)!