teleren/devto huggingface dataset:
Correlate Subqueries
Published: 2023-12-02 05:57:41

In SQL, a correlated subquery is a subquery that uses values from the outer query in its WHERE clause. The correlated subquery is evaluated once for each row processed by the outer query. It exists because it depends on the outer query and it cannot execute independently of the outer query because the subquery is correlated with the outer query as it uses its column in its WHERE clause.

```
SELECT column_name [, column_name...]
FROM   table1 [, table2...]
WHERE  column_name OPERATOR
  (SELECT column_name [, column_name...]
   FROM table_name
   WHERE condition [table1.column_name = table2.column_name...]);
```

```
SELECT e1.employee_name, e1.salary
FROM employee e1
WHERE salary > 
   (SELECT AVG(salary)
   FROM employee e2
   WHERE e1.department = e2.department);
```
actions-hottest🚀: GitHub Actions for Commenting on Golang Unit Test Results in Pull Requests
Tags: go, testing, githubactions, showdev
Published: 2023-12-02 07:46:32

## Make the test results more user-friendly
I previously introduced a feature in the [go-spectest/spectest](https://github.com/go-spectest/spectest), which extracts error messages from Golang unit test results.

I have now separated that functionality into the [nao1215/hottest](https://github.com/nao1215/hottest) command.

The 'hottest' command can use the same options as 'go test':


![demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/us1skwk1qm7oyhmshhvi.gif)

## hottest on GitHub Actions
Many people run unit tests using GitHub Actions. Therefore, I created [nao1215/actions-hottest](https://github.com/nao1215/actions-hottest) to make it easy to execute 'hottest' in GitHub Actions.

Here is an example workflow for running unit tests using 'hottest':
```yaml
name: SampleTest

on:
  push:

jobs:
  sample_test:
    name: sample test

    strategy:
      matrix:
        platform: [ubuntu-latest]

    runs-on: ${{ matrix.platform }}

    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-go@v4
        with:
          go-version: "1"
          check-latest: true

      - name: Download dependencies
        run: go mod download

      - uses: nao1215/actions-hottest@v1
        with:
          # This argument is same as `go test` command.
          args: '-cover -coverpkg=./... -coverprofile=coverage.out ./...'
```

Here are the logs for when the unit tests succeed and when they fail:
- when all test pass
![all-test-pass](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lnp3r7898b8ghcymg2z5.png)

- when some test fails
![test-fail](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pbn3u8y1ph78dfh2s8on.png)

## Comments Test Results in Pull Request
I find it inconvenient to check the workflow logs when tests fail. Therefore, I have decided to have 'hottest' leave the test results as comments in the Pull Request.

Here are the comments for when the unit tests succeed and when they fail:
- when all test pass
![all-test-pass](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k5oqqa1ng7hks87r9gax.png)

- when some test fails
![test-fail](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hj3outuks0dg79s4rfho.png)

## Conclusion
'hottest' is a command that extracts error messages from failed unit tests. You can easily adopt GitHub Actions. Its usage is similar to 'go test,' and there is no need to rewrite the test code.

lease do give 'hottest' a try!! Additionally, your support in the form of a GitHub star would be encouraging for further development.
Token-go: A lightweight library for login authentication
Tags: github, go, programming, tutorial
Published: 2023-12-02 12:59:23

https://github.com/weloe/token-go

**What does it do?**
This library focuses on solving login authentication problems, such as: login, multi-account login, shared token login, token refresh, double token refresh, QR Code login, logout, kickout, banned, second auth, temp-token, SSO …
Using this library can simplify the authentication and authorization business, and only a few lines of code are needed to implement the above business.
Some using examples:
`login token, err := enforcer.Login("1", tokenGo.NewHttpContext(req, w))`
`logout err := enforcer.Logout(tokenGo.NewHttpContext(req, w))`
`Banned err = enforcer.Banned("1", "test", 1, 100)`
`check login b, err := enforcer.IsLogin(tokenGo.NewHttpContext(req, w))`

**Features**

Encapsulated multiple login policies, multi-account system login, same-end login, same-end mutually exclusive login, multi-terminal login, multi-terminal mutual exclusion login, scan code login, SSO single sign-on.
Encapsulate permission authentication functions, such as temporary tokens, second-level authentication, role authentication, and permission authentication.
Encapsulate multiple user session management methods, such as forced logout, kicking people offline, account banning, token auto-renewal, and dual-token renewal.


**Manual**
https://github.com/weloe/token-go/wiki
Advent Of Code 2023: Day 1 - Trebuchet
Tags: adventofcode, programming, csharp
Published: 2023-12-02 19:09:59

## Day 1 - Trebuchet 
[link](https://adventofcode.com/2023/day/1)

Simply put, this challenge requires the developer to retrieve numbers from lines of text, and then add up all the numbers from each line to get a total.


**Part 1** was fairly straightforward. Select all the digits from within the text. This can easily be done via the LINQ Select method, and passing it a method which checks whether the current character is a digit and, if so returns it. 

Once we have this, it's just a case of selecting the first and last items in the array, as we always know there will be more than 1 digit based on the challenge instructions. 

**Part 2** however had me pulling my hair out for a little while, as this was sneakily more complicated. I began by simply pulling out the text and numeric values using a lookup. However, this did not work due to there being overlap between numbers (text version), e.g. 'eightwo' etc. 

To resolve simply replace the matched numbers (in text) format with their digit counterpart, prefixed and suffixed with their text format. This removes any cross over / overlap of words. It's a bit of a hacky solution, but it is one that worked for me (and others it seems online too). 

---
### Solution: Available also at my Github [link to Day 1](https://github.com/gweaths/advent_code_2023/tree/main/Day_1%20-%20Trebuchet)

``` csharp
using System.Runtime.ExceptionServices;
using System.Text;
using System.Text.RegularExpressions;

string FILE_PATH = "./final_input.txt";

Dictionary<string, string> translations = new(){
      {"one", "one1one"},
      {"two", "two2two"},
      {"three", "three3three"},
      {"four", "four4four"},
      {"five", "five5five"},
      {"six", "six6six"},
      {"seven", "seven7seven"},
      {"eight", "eight8eight"},
      {"nine", "nine9nine"}
    };

string OnlyNumerics(string strInput)
{
  StringBuilder builder = new();
  foreach (char ch in strInput)
  {
    if (char.IsDigit(ch)) builder.Append(ch);
  }
  return builder.ToString();
}

string ReplaceNumbers(string original)
{
  foreach (var key in translations.Keys)
  {
    original = original.Replace(key, translations[key].ToString());
  }
  return original;
}

int GetFirstAndLast(string str)
{
  int first = int.Parse(str[0].ToString());
  int last = int.Parse(str[^1].ToString());

  return first * 10 + last; // this converts first digit to a 10th digit e.g 1 = 10, 2 = 20
}

int Challenge_1()
{
  string[] lines = File.ReadAllLines(FILE_PATH);
  return lines.Select(OnlyNumerics).Select(GetFirstAndLast).Sum();
}

int Challenge_2()
{
  string[] lines = File.ReadAllLines(FILE_PATH);
  string[] replaced = lines.Select(ReplaceNumbers).ToArray();
  return replaced.Select(OnlyNumerics).Select(GetFirstAndLast).Sum();
}

Console.WriteLine("Part 1:" + Challenge_1().ToString());
Console.WriteLine("Part 2:" + Challenge_2().ToString());

```
Radiant Brilliance: 14K Gold Moissanite Earrings by Goilleria Jewelry
Tags: moissanitegoldchain, moissanitegoldchain14k, moissanitegoldpendant
Published: 2023-12-02 21:50:10


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zcl5ncqexelwi9pfeajw.jpg)Elevate your style with the mesmerizing allure of our [Moissanite Gold Earrings](https://www.giolleria.com/earrings) in 14K by Goilleria Jewelry. Crafted to perfection, these exquisite earrings showcase the unparalleled beauty of moissanite stones set in stunning 14K gold. Indulge in luxury and sophistication as these earrings effortlessly illuminate any ensemble, exuding timeless elegance and unmatched sparkle. Discover the epitome of glamour and grace with these remarkable Moissanite Gold Earrings, a true statement of opulence and refinement from Goilleria's collection.
Deploy Cal.com on Digitalocean
Tags: nextjs
Published: 2023-12-03 09:38:56

## Introduction
Cal.com is an open source scheduling platform that enables you to take bookings on your own terms. Set your availability, connect your favorite calendar and video conferencing platforms, and share your link. It's that simple.

### What is Caprover
Caprover is an Opensource Platform as a service like Heroku that allows you deploy web apps on a vps, Caprover uses docker to manage this and issues free ssl certificates powered by letsencrypt.

Follow this [guide](https://www.codecademy.com/article/smyja/nextjs-deployment-with-caprover-and-github-actions) i wrote  to set caprover up on digitalocean. Stop at the _Setting up a NextJs_ app section since we are not interested in that.

Once you have Caprover running, create an app from the one click apps section.  
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ctozpqewhk9xsjh0szaz.png)

Search for Cal and and add the one that requires a database
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pekvgl8bvsf53t6sky20.png)

Enter the app name, leave every other option the same(they can be changed) then click finish, next two screenshots show it processing.

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



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

It's complete
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xq0hwb2vk9bm5gtymfdk.png)

Ensure you force https in the settings tab then go to APP Config and change the NEXT_AUTH to https://yourwebsite.com, click save and Restart.

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

It takes about 15 minutes to complete the build process and for the website to be live because the prisma migrations take time.

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

Ensure you add all the necessary environment variables specified in the root directory of cal.com
Once it's done, visit your url and you should see this.
Setup your administrator account with your details.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u1489eznoqmbc25m39xq.png)
### Conlusion
We have been able deploy Cal.com on Digitalocean, so go ahead and Make your bookings.
A Timeless Elegance: The Allure of the Black Silk Gown
Published: 2023-12-03 08:36:40

When it comes to fashion, few garments possess the same level of sophistication and allure as the black silk gown. This iconic piece has stood the test of time, captivating fashion enthusiasts and designers alike. Its timeless elegance and versatility make it a staple in every woman's wardrobe.

## The History of the Black Silk Gown

The black silk gown has a rich history that dates back centuries. It first gained popularity during the Victorian era when black became the color of mourning. Women would wear black silk gowns to express their grief and pay homage to their departed loved ones. However, the association with mourning soon faded, and the black silk gown became a symbol of elegance and refinement.

Throughout the years, the black silk gown has been reinvented and reimagined by fashion designers. From the sleek and minimalistic designs of the 1920s to the glamorous and voluminous styles of the 1950s, each era has added its own unique touch to this timeless garment.

## The Allure of the Black Silk Gown

There is something undeniably captivating about a woman in a black silk gown. The combination of the luxurious fabric and the color black creates an aura of sophistication and mystery. The way the gown drapes and flows enhances the wearer's silhouette, accentuating her curves and creating a sense of allure.

One of the reasons why the black silk gown has such enduring appeal is its versatility. It can be dressed up or down, depending on the occasion. Paired with statement jewelry and high heels, it becomes the epitome of glamour and elegance. On the other hand, when styled with minimal accessories and flats, it exudes effortless chicness.

## A Timeless Investment

Investing in a black silk gown is a decision that will pay off for years to come. Unlike trendy pieces that come and go, the black silk gown is a classic that will never go out of style. Its timeless appeal ensures that it will always be a go-to option for formal events, parties, and special occasions.

Furthermore, the durability and quality of silk make it a wise investment. With proper care, a black silk gown can last a lifetime, maintaining its luster and elegance. It is a piece that can be passed down through generations, becoming a cherished heirloom.

## Conclusion

The allure of the black silk gown is undeniable. Its timeless elegance, versatility, and rich history make it a must-have in any fashion-conscious individual's wardrobe. Whether worn for a glamorous event or a casual outing, it never fails to make a statement.

So, embrace the allure of the [black silk gown](https://www.thesilkinc.com/collections/slip-dresses?utm_source=dev_to&utm_medium=rankking) and let it become your go-to garment for any occasion. Its timeless elegance will never disappoint.

## References

  * [black silk gown](http://testphp.vulnweb.com/redir.php?r=https://www.thesilkinc.com/collections/slip-dresses "black silk gown")



### Links:

  * [Vogue](https://www.vogue.com)
  * [Harper's Bazaar](https://www.harpersbazaar.com)
  * [Elle](https://www.elle.com)
Don't worry, I've not given up!
Tags: javascript, css, git, html
Published: 2023-12-03 17:28:51

Hi guys!!

I've just finished my first week of the Front-End Web Development bootcamp. Some of you weren't lying when you said it's fast paced but I have definitely learned a lot!

I took loads of notes during the pre-work leading up to the course starting, as well as during the classes so have created a series to touch up on everything, refresh my memory and hopefully teach anyone that's in the same boat as me and is just figuring it all out.

As always feel free to comment with tips and advice :)

Sit tight!
Nicole
📝 Stay organized with the Komodore's TO-DO APP v2.7
Tags: tooling, news, update, management
Published: 2023-12-04 16:06:57

### CHECK OUT THE NEW **_FANCY_** UPDATE RIGHT NOW on [itch.io](https://komodore.itch.io/komodore-todo)
![fancy update](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u2148w1v8ttd75ykahr1.gif)
## Now you can hightlight you tasks using **special effects**.
### [**CHECK IT OUT RIGHT NOW !!!**](https://komodore.itch.io/komodore-todo)
9 Top Picks For The Best Smart Roller Shades
Published: 2023-12-05 03:52:44

# 9 Top Picks For The Best Smart Roller Shades

When it comes to home automation, **smart roller shades** are among the most popular additions. [smart roller shades](https://us.switch-bot.com/collections/motorized-blinds?utm_source=dev_to&utm_medium=rankking) allow you to adjust the amount of light entering a room, and they provide an extra layer of privacy and security. Plus, they look great in any home. With so many options on the market, it can be difficult to know which one is right for you. To help you out, we’ve compiled a list of the top nine **smart roller shades** on the market.

## 1\. Somfy Motorized Roller Shades

Somfy is one of the leading brands in home automation, and their Motorized Roller Shades are a great choice for those looking for convenience and style. These shades are easy to install and operate, and they are compatible with a variety of voice-controlled systems. Plus, they come in a variety of colors and styles to match any décor.

## 2\. Lutron Sivoia QS Roller Shades

Lutron is another popular choice when it comes to home automation, and their Sivoia QS Roller Shades offer a sleek and modern look. These shades are battery-operated, so you don’t have to worry about cords or wires. They also come with a variety of features, like light sensors and voice control, that make them easy to customize and use.

## 3\. MySmartBlinds Automation Kit

MySmartBlinds Automation Kit is the perfect choice for those looking for a budget-friendly option. This kit comes with an adapter and a remote, so you can easily control your shades from anywhere. Plus, the adapter is compatible with a variety of voice-controlled systems, so you can integrate your shades into your existing home automation system.

## 4\. Somfy Telis 1 Soliris RTS

The Somfy Telis 1 Soliris RTS is a great choice for those looking for a more high-end option. This roller shade system comes with a remote and a wall switch, so you can easily control your shades from anywhere. Plus, it’s compatible with a variety of voice-controlled systems, so you can integrate it into your existing home automation system.

## 5\. QMotion Advanced Roller Shades

QMotion Advanced Roller Shades are a great choice for those looking for a stylish and modern look. These shades come with an easy-to-use remote, so you can easily adjust the amount of light entering a room. Plus, they come in a variety of colors and styles to match any décor.

## References

  * [smart roller shades](https://mamibuy.com.hk/iframe/?src=//us.switch-bot.com/collections/motorized-blinds "smart roller shades")



## 6\. Somfy Motorized Roller Shades with MyLink

The Somfy Motorized Roller Shades with MyLink offer a great blend of convenience and style. These shades come with a remote and the MyLink app, so you can easily control your shades from anywhere. Plus, they are
Made a Dapp to Generate, Deploy and Test Smart Contract 🔥
Tags: web3, blockchain, smartcontract, ethereum
Published: 2023-12-05 05:40:47

In the dynamic world of blockchain technology, the demand for user-friendly decentralized applications (dApps) is skyrocketing. Addressing this need, SmartContractX emerges as a groundbreaking platform that seamlessly combines smart contract deployment, generation, and testing into a unified and user-friendly experience. In this blog post, we'll explore the key features of sSmartContractX and how it empowers users to effortlessly interact with smart contracts.

Let me disclose all the Features of SmartContractX one by one :

1) Deploy smart contract: SmartContractX redefines the process of deploying smart contracts by streamlining it into a straightforward and accessible experience. Users simply input the smart contract source code, their private key, and the desired network, and with the click of a button, witness the automated deployment of their smart contract. The platform ensures efficient deployment, providing users with the contract address promptly.

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



2) Generate Smart Contracts with OpenAI Integration:
One of the standout features of SmartContractX is its integration with OpenAI, Users can leverage the power of OpenAI's capabilities to generate smart contracts tailored to their specific requirements. By specifying the desired type of smart contract and providing the OpenAI API, users can initiate the generation process with a single click. This groundbreaking feature not only simplifies the smart contract creation process but also introduces an innovative approach to blockchain development.

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



3) Testing Smart Contracts with Ease:
To complete the comprehensive suite of features, SmartContractX facilitates the testing of smart contract functionalities. Users need only provide the contract address, enabling them to interact with the read and write functions of their deployed smart contracts. But need to make sure the contract they want to test is verified 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0vk93noug70y5ox1gpa9.PNG)


Made using :
- etherjs
- nodejs
- express
- nextjs

If you are interested to get the source code ,Api and widget then connect me in Twitter I will share you the source code 

My twitter Profile Link: https://twitter.com/SouravMaji221
I took some notes about servers.
Published: 2023-12-05 13:37:14



I had difficulty figuring out what is a server. I was confused because peoples talking about server seems not to refer to the same thing. For me, a server was a machine that you could communicate and that could do whatever you want. Store data for example. Then I got to install Apach2, and at the moment my definition didn’t sound quite right. I was completely lost. How can Apach2 be a server if it wasn’t a machine but software?

If you are in the same case, let me explain.




**First, what is the internet, and what is the web?**

Internet is all of the machines that communicate together by cables constituting a network.

Those machines want to exchange messages. Those messages are sent by a protocol. A protocol is the way you should read the message. There are a lot of protocols: HTTP, SCP, FTP… Itch has its specificity. But the most common on the web is HTTP.

HTTP is for HyperText Transfer Protocol. Everything is in the title. HTTP is a protocol that allows you to exchange Hypertext messages, so text. The language we use to write the message is HTML for HyperText Markup Language. So if you want to share information you can wright an HTML file.

HTML files contain text that can be structured with tags. For example h1 to create a title. That’s how you build a web page. One of the tags is particularly interesting. It is the a tag. It allows you to create a link to another web page. So at the end, you have a tone of web pages linked between them. And that is the WWW. The World Will Web (WWW) is a network in which pages redirect to each other by links.




**How do we do that? How can we exchange messages?**

I wrote my web page index.html locally (on my laptop) that I want to share. Now what?

I want people to have access to my web page. So I send my index.html to another machine that will have the job to share my web page. That could be any computer. This computer will listen to requests from other computers that want to have access to my web page (clients) and respond to them. This is what we call my server.

But work, our computer needs software that can manage the requests and that knows HTTP. This software is my web server or my web application. There are many and Apach2 is one of them.

To listen to requests, we have to attribute a port to our web server. Basically, we tell it “Hey! This is your canal of discussion!”. To reach our web server, the client will have to send its request to my server’s IP to this port. The default port for HTTP servers is port 80.

When the APP (application) receives a request, it will search into the server’s files and send the content of the file requested. The file by default is index.html.

Now, you can understand how a URL works.


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