teleren/devto huggingface dataset:
CustomTag CFScript "Nuance"
Tags: coldfusion, cfml
Published: 2022-07-18 19:15:00

I still have some CustomTags that we've used in production for years and, now that I'm writing more cfscript, I thought I'd continue using some of them (for now) using the following syntax that I learned about on [StackOverflow](https://stackoverflow.com/a/69410685/693068):

```
CFML tag-based approach:
<cf_customTagName param1=param1Value>

CFScript approach:
cf_customTagName(param1=param1Value);
```

I immediately discovered that the cfscript method was executing the tag twice.  In order to execute the tag-based version twice using CFML tag-based syntax, you need to explicitly use a starting and closing tag and then check for `thisTag.executionMode` with a value of either `start` or `end`.

```
<cf_customTagName param1=param1Value>
    <!--- this runs the tag twice w/different executionModes --->
</cf_customTagName>
```

The "nuance" (that CFM-based custom tags are always executed twice twice via cfscript) isn't documented on the only Adobe documentation that discusses this: "[Script support for custom tags](https://helpx.adobe.com/coldfusion/cfml-reference/script-supported-tags-and-functions.html)".  (NOTE: I'm not sure if this behavior is the same in Lucee CFML.)

The solution for this is check whether the CFM file is being executed as a CustomTag (ie, if `thisTag.executionMode` exists and is `start`) and then exit.

```
<cfif isDefined("thisTag.executionMode") and thisTag.executionMode is "start">
    <cfexit>
</cfif>
```

If you don't explicitly do it this way, you'll risk having the customtag's functions unknowingly performed twice which can cause data problems or negatively impact performance.

Here's the files I set up to reproduce and test this:

https://gist.github.com/JamoCA/2d48f9eb88ceb7f8bcb93fc3ab718ffa

{% gist https://gist.github.com/JamoCA/2d48f9eb88ceb7f8bcb93fc3ab718ffa %}
A benchmark to show you how fast my ORM framework is
Tags: java, orm
Published: 2022-07-18 19:12:11

I've create a new ORM framework [Jimmer](https://babyfish-ct.github.io/jimmer-doc/), it has achieved the following two goals

- More powerful than other ORM frameworks
- Faster than other ORM frameworks

Regarding the first point, it is difficult to explain in the limited space. Users must read all the contents of the documentation before they can understand it.

However, regarding the second point, one benchmark picture can tell everything.

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

- The abscissa represents the count of data objects queried from the database.
- The ordinate represents the operation count per second.

**If you want to view full benchmark report, click [here](https://babyfish-ct.github.io/jimmer-doc/docs/benchmark) please.**

**If you want to run the benchmark, run this [project](https://github.com/babyfish-ct/jimmer/tree/main/benchmark) please.**
Scan and detect your leaky APIs
Published: 2022-07-18 18:40:34

I'm extremely eager to show you this device I have been chipping away at. This device is based on top of Apisec.ai, an API security stage.

This help is for people with versatile/web applications with backend REST APIs. It performs free and moment entrance testing/security evaluation for the REST APIs.

Simply point towards your live OpenAPI determination record and get a PDF infiltration test report soon.

Kindly attempt and let me in on what is your take?

Here is the immediate connection
https://ethicalcheck.apisec.ai
There will be 175 Zettabytes of data in the world by 2025. Where will we store it?
Tags: awsdatabases, terraform, bigdata, aws
Published: 2022-07-18 18:34:00


_**Did you know that a Zettabyte has 21 Zer0s?**_


In this series of articles, you will learn about the different databases that AWS offers, and their purpose.

**What is a Database?**

It is a collection of information (Data) commonly stored on a computer. 


**What is the purpose of building databases?** 

The amount of data we receive daily from limitless sources, such as IoT devices, phones, watches, TVs, and more, at such a fast rate is almost unpredictable. However, we can at least predict where the data is coming from, what data models to expect, and what use cases we could develop based on the data source and type. In simple terms, the purpose of building databases is to save and organize information (data) for future analysis.

**Let us list some of the Databases known today:**

- Document  
- Relational 
- Time series 
- Ledger 
- Key value 
- In memory 
- Wide column 
- Graph 

**How would this list be categorize in AWS:**


![db's](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1zybsvrbz45j8y2ou7ac.png)
 

**To be continued:** 

At the end of this series of articles, you will have learned more about each database on the list above, as well as gained hands-on experience in specific use cases by creating and deploying them yourself using Terraform.
Codex - Give new meaning to your codebase
Tags: tooling, productivity, showdev, vscode
Published: 2022-07-18 18:29:55

Hey Dev.to!

Our company, [Codex](https://usecodex.com), is live on [Product Hunt](https://www.producthunt.com/posts/codex-a456c800-169b-4efa-baaa-0f0c49805ce7) now and we'd love your support via an upvote! 

TL;DR: Codex makes programming more multiplayer by extending your IDE so you can attach context to any repo, file, or line(s) of code. Leave meaning in the code for your team so they can ship faster 🚢



With Codex you can:
📝 Take notes while you code and help your team understand how it was built
✋ Ask the right person a question, without disturbing their flow
🔗 Share a direct link to a code block in VS Code instead of sending screenshots
🏷 Custom labels to collect information together like tech debt, bugs, security issues, or whatever you're into
Old Validation ( dimensions ) - Laravel
Tags: php, laravel, webdev, programming
Published: 2022-07-18 18:23:48

Today we will learn about this validation very important thing that makes us control the dimensions of the images uploaded to our project. It is old after something, but it is not known to some developers.
Visit the sources :- 
https://laravel.com/docs/9.x/validation#rule-dimensions
https://mattstauffer.com/blog/image-dimension-validation-rules-in-laravel-5-3/

- Here we learn about the properties that we will use while checking the dimensions of the image

```php
In Laravel 5.3, we have a new validation option: image dimensions for image uploads
The validation rule is called dimensions, and you can pass the following parameters to it 

min_width: Images narrower than this pixel width will be rejected
max_width: Images wider than this pixel width will be rejected
min_height: Images shorter than this pixel height will be rejected
max_height: Images taller than this pixel height will be rejected
width: Images not exactly this pixel width will be rejected
height: Images not exactly this pixel height will be rejected
ratio: Images not exactly this ratio (width/height, expressed as "width/height") will be rejected

```

- Now, let's make our ImageController and take a look at a few sample validations

```php
 public function postImage(Request $request)
 {
        $this->validate($request, [
             'avatar' => 'dimensions:min_width=250,min_height=500'
        ]);

        // or... 

        $this->validate($request, [
             'avatar' => 'dimensions:min_width=500,max_width=1500'
        ]);

        // or...

        $this->validate($request, [
             'avatar' => 'dimensions:width=100,height=100'
        ]);

        // or...

        // Ensures that the width of the image is 1.5x the height
        $this->validate($request, [
             'avatar' => 'dimensions:ratio=3/2'
        ]);
}
```

- use the Rule::dimensions method to fluently construct the rule

```php
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
 
Validator::make($data, [
    'avatar' => [
        'required',
        Rule::dimensions()->maxWidth(1000)->maxHeight(500)->ratio(3 / 2),
    ],
]);
```

I hope you enjoyed the code and I wish you a happy code .
Earned 10 Certifications on Kaggle.
Tags: datascience, machinelearning, deeplearning, ai
Published: 2022-07-18 17:35:35

Dear, Everyone. Thank you being with my AI journey.

In these days, I have been keep learning from Kaggle courses. By today, I completed 10 tutorials on Kaggle and earns 10 certifications.

- Intro to Programming
- Python
- Intro to Machine Learning
- Pandas
- Intermediate to Machine Learning
- Data Visualization
- Feature Engineering
- SQL
- Advanced SQL
- Intro to Deep Learning

You can find all my work on my Github repository. If this repo is helpful for you, you can **star** that one.
https://github.com/levintech/kaggle-courses

Thanks for reading my first post carefully.
To **encourage** me continue work, please **follow me** on **Dev.to** and **Github**.

https://dev.to/levintech
https://github.com/levintech

Best Regards.
Set Up a React App Using Clean Architecture by Running One Command
Tags: opensource, typescript, react, cleanarchitecture
Published: 2022-07-18 17:20:00

Create React apps using [Clean Architecture](https://dev.to/rubemfsv/clean-architecture-the-concept-behind-the-code-52do) with no build configuration.

It's like create-react-app, but more efficient and easier to scale. The purpose is to help improve time during development.

- [User Guide](https://dev.to/rubemfsv/clean-architecture-applying-with-react-40h6) – How to develop apps bootstrapped with Clean React App.

Clean React App works on macOS, Windows, and Linux.<br>
If something doesn’t work, please [file an issue](https://github.com/rubemfsv/clean-react-app/issues/new).<br>

## Quick Overview

```sh
npx @rubemfsv/clean-react-app my-app
cd my-app
npm start or npm run dev
```
Done. Everything is set up and ready to run.

<hr />

**This boilerplate contains the following settings:**
- Local storage adapter;
- Axios as HTTP Client;
- Webpack configured for development and production environments;
- Basic end-to-end test settings with Cypress;
- Unit tests with Jest;
- Husky with pre-push to run unit tests;
- Authentication with validations;
- Validation layer for reuse of validations;
- Some hooks to help with API calls and form submissions;
- Private route configured;
- Three pages to help improve productivity:
  - Login page
  - Sign up page
  - Dashboard


# It's open source. Feel free to contribute!

Link: https://www.npmjs.com/package/@rubemfsv/clean-react-app
Recientemente conseguí un trabajo por UpWork pero no se a quién tengo que emitirle la boleta (thread)
Published: 2022-07-18 17:12:44

**G
  9:16 AM**
Hola! Recientemente conseguí un trabajo por UpWork pero no se a quién tengo que emitirle la boleta, si directamente a upwork o al cliente que me contrato. ¿Alguien ha trabajado por esta plataforma y sabe a quién emitirle las boletas o bien conozcan a un contador que me pueda ayudar?

**nico
  9:52 AM**
Tengo entendido que UPwork genera un invoice de ti para tu cliente, y otro de ellos hacia ti (donde te cobran un fee).
En otras palabras, Upwork actúa como intermediario y por ende tus servicios no son hacia Upwork, son hacia el cliente.
Así que tienes que hacerle la boleta al cliente. Si es una empresa de Chile, puedes pedirle el RUT y hacer una boleta de honorarios a ese RUT.
Si está fuera de Chile, tienes que hacer la boleta con el RUT 44.444.446-0 ("extranjeros sin RUT").
El monto, yo lo haría como PAGO - FEE, porque eso es lo que realmente te llega.
Ahora bien, si tu vas a operar como empresa, ahí cambia un poco las cosas. Pero supongo que no es tu caso.

**9:54**
Nota: la boleta de honorarios es para que puedas justificar tus ingresos, no tienes que mandarla a tu cliente (a menos que sea de Chile).


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dj747xgs8qj45fw1kada.png)
How to create Laravel - E Commerce Website
Tags: laravel, php, beginners, webdev
Published: 2022-07-18 17:08:03

**Laravel E Commerce Website**
I created the E commerce website using Laravel framework


![Home page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4tu72qz1q3u0dfcdalek.png)


## Download Source Code
◽Check it out [Link](https://github.com/vinobe21/Laravel-E-commerce-)
◽[Github](https://github.com/vinobe21)


## Features

- Home page, Header and Footer

- Login, Admin login and Register page 

- Add to Cart function, Show cart list page and Remove cart

- Place your order, Check order details


## How to Install?

- Clone the repository [Link](https://github.com/vinobe21/Laravel-E-commerce-)
- Rename .env.example file to .env
- Create database 
- Run `composer install` or `composer update`
- Run `php artisan key:generate`
- Run `php artisan migrate`
- Run `php artisan db:seed`


> This project useful for beginners, if you have any queries and suggestions leave them in the comments section
Which do you prefer to write?
Tags: lua, survey, discuss, question
Published: 2022-07-18 17:01:39

Good afternoon!

I'd like to know which you prefer to write more:
[wren](https://wren.io)
or
[lua](https://lua.org)
as a scripting language for configuration.
Like you configure [awesome](https://awesomewm.org) in lua.

Thanks for your response!
Great progress made last week
Tags: devops, javascript, react, python
Published: 2022-07-18 16:34:15

Happy Monday Dev Community! We made great progress last week.

We overcame a significant architectural challenge, and we are happy to announce that we have officially integrated Open ID Connect based Single-Sign-On into the OSS version for local use. This integration was essential as we require the TruStacks solution to run in both public/private (connected) clouds and on-premises environments in addition to running directly on a single desktop/laptop. This provides a wide range of options for users to develop, test, and deploy TruStacks.

We are updating the required components to integrate with SSO, and the application install process. We are planning on final integration, testing, and readiness for this week.

We will be showcasing the solution running on a local machine using k3d (dockerized Rancher K3S, https://k3d.io/).
Let us know if you have any questions, comments, or feedback and we will be in touch this week for another update.

Click below to join our Discord channel and stay in the loop for future updates.

https://discord.gg/J6YksbUd
Choosing Between SASS vs CSS Modules vs CSS-In-JS
Tags: react, css, javascript, webdev
Published: 2022-07-18 16:32:50

We are in the midst of building the first version of our API Ops platform. One of the components which we are actively building is a developer console where devs can get an overview of their APIs and each endpoint’s performance. While building our UI, we are debating many of the fundamental front end architecture decisions that will shape our UI development. One of the biggest debates thus far was whether we would use SASS or CSS-In-JS for our styling.

We know developers are facing these same questions every day, so we want to publish our thoughts in case they are useful to anyone else. Ultimately, we chose to move forward with CSS-In-JS as our primary styling mechanism for reasons specific to our business:we considered it important for the UIs we build to be easily embeddable within external UIs. We felt that CSS-In-JS was the best option for embeds, because integrators wouldn’t need to worry about dealing with style injection, and could theme our components into their style.

We’d love to know your thoughts and how you reached decisions about styling your UI? Have you had any bad experiences with CSS-In-JS? 

Below is our full internal conversation only minimally edited for brevity:

![original slack question](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/suon7bxl73ubu7i0qbt7.png)
![Value of Sass](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pwoj7tgkktwdtpwj0tgf.png)
![Downsides of Sass](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wapyc019v59k802e4cfw.png)
![Another Angle](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/elmght0kj3hrrp022vum.png)
![Conclusion](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/992iv2ifnuw0al1vyd3s.png)

If you’re interested in learning more about what we’re up to, [please reach out!](https://www.speakeasyapi.dev/request-access)
Vercel-styled TOAST web widget for any website!
Tags: javascript, html, webdev, opensource
Published: 2022-07-18 16:24:00

Few YEARS ago, I created a framework-agnostic toast widget, it is really Vercel flavoured, lite and elegant, plus, it is only `≈1Kb` in gzip!

How it looks like you can see the cover gif.

🙌 Til now it has `1k+` downloads in NPM and used by `40+` GitHub repositories, ~~feeling great!~~

I am pretty sure it is useful for any website, and it is dead simple to use:

```js
import 'vercel-toast/css'
import { createToast } from 'vercel-toast'

createToast('The Evil Rabbit jumped over the fence.')
```

Feel free to reach out the:
- Simple doc goes 👉 https://vercel-toast.vercel.app
- GitHub repository goes 👉 https://github.com/2nthony/vercel-toast

If this widget helped you and you like it, please give me a ⭐️ 🙌.
A question about developer product emails
Tags: watercooler, discuss
Published: 2022-07-18 16:19:01

---
title: A question about developer product emails
published: true
description: When you sign up for a new product you'll likely get at least one email.
tags: #watercooler #discuss
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---

When you are testing out a new developer product, either personally or professionally, how do you feel about product emails after signing up?

I recently had a product that's specifically marketed for developers email me twice within 2 hours of signing up, and then a 3rd time within 18 hours.

Is this what you would expect? Too much? Depends on the email content? I'm curious what others think before I bias everyone with my thoughts 😆.
`Send` and `Public Send` in Ruby
Tags: ruby, rails
Published: 2022-07-18 16:17:08

These are methods I learned of when I was learning Ruby and I never understood why they exist or where they'd be used. Regardless, they exist and I finally found out a use case this weekend. 

First off,  what is Send and Public Send? (According to the docs [send](https://apidock.com/ruby/Object/send) and [public send](https://apidock.com/ruby/Object/public_send))

Send: Invokes the method identified by symbol, passing it any arguments specified. You can use __send__ if the name send clashes with an existing method in obj. When the method is identified by a string, the string is converted to a symbol.

Public Send : Invokes the method identified by symbol, passing it any arguments specified. Unlike send, public_send calls public methods only. When the method is identified by a string, the string is converted to a symbol.

I was building a helper in rails for forms to auto-generate the input tags for specific model fields, so I'd define an array like this
```
cols = ["first_name", :user, :first_name, "text"]
```
Where we have the tag's name, the model, the field, and the tag type in that order. This array is then sent to the view where the tags are built based on the contents of the array.

This was done to access the model in such a way that I do not have to hard code it for specific models(as is the case of associated models and such). I was using public send like this ```
cols[1]&.public_send(col[2])
```
This will call only the public method named in cols[2] of the model named in cols[1]. 

I can't think of another use case for public_send and send, so if you're a ruby veteran, please let me know down below if you have used it before.
What happens when our computers get smarter than we are?
Tags: superintelligence, technolog, information, todayilearned
Published: 2022-07-18 16:13:47

Technology has accumulated through human history, and right now, technology advances extremely rapidly that is the proximate cause, that's why we are currently so very productive.

What we do know is that the ultimate limit to information processing in a machine substrate lies far outside the limits in biological tissue. This comes down to physics. A biological neuron fires, maybe, at 200 hertz, 200 times a second. But even a present-day transistor operates at the Gigahertz. 

Neurons propagate slowly in axons, 100 meters per second, tops. But in computers, signals can travel at the speed of light. There are also size limitations, like a human brain has to fit inside a cranium, but a computer can be the size of a warehouse or larger. So the potential for superintelligence lies dormant in matter, much like the power of the atom lay dormant throughout human history, patiently waiting there until 1945. In this century, scientists may learn to awaken the power of artificial intelligence. And I think we might then see an intelligence explosion. We need to think of intelligence as an optimization process, a process that steers the future into a particular set of configurations. A superintelligence is a really strong optimization process.
CSS Icon: Android
Tags: css, webdev, beginners, tutorial
Published: 2022-07-18 16:09:25

In this article, I will create a Android icon by using CSS only. Let's look at how we do that.

## Problem 

![problem](https://imgur.com/ppa6xAS.png)

## Solution
First, we need to create the structure for this logo then we will style that structure.

### HTML

```html
<div class="wrapper">
  <div class="head"></div>
  <div class="center-square"></div>
  <div class="left-hand"></div>
  <div class="right-hand"></div>
  <div class="left-foot"></div>
  <div class="right-foot"></div>
  <div class="eye-left"></div>
  <div class="eye-right"></div>
  <div class="left-ear"></div>
  <div class="right-ear"></div>
</div>
```

Here we have an outer container `.wrapper` and it contains multiple parts of the logo.


### CSS

Let's first style the `.wrapper` and `.center-square`:

```css
.wrapper {
  --bg: #222;
  --clr: #aac148;
  position: relative;
}
.center-square {
  width: 140px;
  height: 115px;
  border-radius: 5px;
  transform: translatey(16px);
  background: var(--clr);
}
```

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1658159646613/BWdAvk5vv.png)


Now let's just style `left-hand`, `right-hand`, `left-foot` and `right-foot`: 

```css
.left-hand,
.right-hand,
.left-foot,
.right-foot {
  position: absolute;
  height: 95px;
  width: 30px;
  background: var(--clr);
  border-radius: 100px;
}

.left-hand {
  top: 0;
  left: 0;
  transform: translate(-37px, 16px);
}

.right-hand {
  top: 0;
  right: 0;
  transform: translate(37px, 16px);
}

.left-foot {
  left: 28px;
  margin-top: -25px;
}

.right-foot {
  margin-top: -25px;
  right: 28px;
}
```

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1658159728633/2NfKz7q60.png)

Now adding `head` and `eyes`:

```css
.head {
  position: absolute;
  width: 100%;
  height: 70px;
  background: var(--clr);
  transform: translatey(-60px);
  border-radius: 100px 100px 5px 5px;
}

.eye-left,
.eye-right {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 100px;
  background: var(--bg);
  top: 0;
}

.eye-left {
  transform: translate(32px, -28px);
}
.eye-right {
  right: 0;
  transform: translate(-32px, -28px);
}
```



![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1658159902853/58iiNO7_8.png)


Now the last thing we need to add is ears:


```css

.left-ear,
.right-ear {
  position: absolute;
  width: 6px;
  height: 50px;
  border-radius: 100px;
  background: var(--clr);
  top: 0;
}

.left-ear {
  transform: translate(34px, -78px) rotate(-30deg);
}

.right-ear {
  right: 0;
  transform: translate(-34px, -78px) rotate(30deg);
}
```


After all this, now our final product is ready.

## Codepen 

{% codepen https://codepen.io/j471n/pen/qBoWrNa %} 

## Wrapping up
If you have any queries, feel free to drop a comment below. This is a series of CSS Icons so make sure you follow for more such articles. If you like this then don't forget to ❤️ it. And I'll see you in the next one.