teleren/devto huggingface dataset:
MySQL invisible columns and how to define it with Laravel and Doctrine
Tags: mysql, php, laravel, doctrine
Published: 2023-11-13 20:08:18

Many developers don't know that MySQL now has support for invisible columns.

But what exactly is an invisible column?

## When it arrives?
This attribute is available on MySQL since **v8.0.23**. According to the documentation:

> An invisible column is normally hidden to queries, but can be accessed if explicitly referenced. Prior to MySQL 8.0.23, all columns are visible.

The syntax to create an invisible column is very simple:

```sql
create table employees (
    id int not null primary key auto_increment,
    name varchar(45) not null,
    ssn char(11) not null INVISIBLE
) ENGINE = InnoDB;
```

Certainly, we can use DDL to switch a column between **visible** and **invisible**.

```sql
alter table employees alter column ssn set visible;
```

## Querying Data
Now, what happens if I execute `select * from employees`?

![Querying all columns](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t8ldjp0hoc3j7f43y97w.png)

Wow, where is my `ssn` column? Well, it's hidden 🙂! To retrieve that column, we need to explicitly specify it in our query:

![Querying all columns with ssn](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/crr4izjqcwisz9tftoz0.png)

This is a good approach to exclude columns that don't need to be displayed in our query, such as those containing sensitive data.

## Generating an invisible column with a Laravel Migration

If you wish to utilize this feature in a Laravel application, you can define your column as follows:

```php
public function up(): void
{
    Schema::create('employees', function (Blueprint $table) {
        $table->id();
        $table->string('name', 45);
        $table->char('ssn', 11)->invisible();
    });
}
```

## Generating an invisible column with Doctrine
I've defined an entity called `Employee` with the following configuration
```php
#[ORM\Entity]
#[ORM\Table(name: 'employees')]
class Employee
{
    #[ORM\Id]
    #[ORM\Column(type: 'integer')]
    #[ORM\GeneratedValue]
    private int | null $id;

    #[ORM\Column(type: 'string', length: 45)]
    private string $name;

    #[ORM\Column(columnDefinition: 'char(11) INVISIBLE')]
    private string $ssn;
    
    // The other methods of this entity
}
```

Now, we have an additional security layer to prevent the exposure of our sensitive data!

That's all folks! See you on the next post 🙂 👍🏻
Redux
Published: 2023-11-13 20:07:11

A biblioteca Redux, desenvolvida em JavaScript, destina-se ao gerenciamento de estados em aplicações. Sua aplicabilidade estende-se a diversos frameworks e bibliotecas, como React, Angular, Vue.js, Node.js, React Native, e abrange tanto o uso de JavaScript quanto TypeScript em ambientes de desenvolvimento em geral.

[Notion: Como usar o redux](https://renanmms.notion.site/Redux-33aa35ca6f32471999eab50c5218f0df?pvs=4)
🚀 New Video Alert: 'Mastering LeetCode's 'Range Sum Query - Immutable' with Dynamic Programming!' 🎥
Tags: leetcode, java, codenewbie, coding
Published: 2023-11-13 19:45:39

Hello, tech community! Excited to share my latest video where I tackle LeetCode problem 303 - 'Range Sum Query - Immutable' using the power of dynamic programming. Join me in exploring a dynamic programming approach to efficiently calculate range sums in an immutable array.

🎥 YouTube Video Link: https://youtu.be/9GMbO1stqnM?si=MCP-L5485SgOjc6i
🔗 GitHub Repository: https://github.com/Vinay352/Leetcode/tree/main/0303-range-sum-query-immutable
🔗 LeetCode Question: https://leetcode.com/problems/range-sum-query-immutable/

Your thoughts and feedback are invaluable, so feel free to share in the comments below. Let's continue our journey of learning and coding together! 💡👨‍💻

Stay connected:
🎥 YouTube: https://www.youtube.com/@VinayJainDev3097/
🔗 GitHub: https://github.com/Vinay352
🐦 Twitter: https://twitter.com/vinayj3097
📸 Instagram: https://www.instagram.com/vinay_jain_dev/
📝 Dev.to: https://dev.to/vinay_jain_dev
📘 Facebook: https://www.facebook.com/vinayj3097/
XML in Android Studio
Tags: xml, mobile, android, tutorial
Published: 2023-11-13 19:24:27

**The different layouts in XML are:**
- RelativeLayout
- LinearLayout
- FrameLayout
- ConstraintLayout
- TableLayout
- GridLayout
- Nested layouts
- TabLayout

**The different tags in XML:**

- TextView
- ImageView
- View
- ImageButton
- EditText
- Button
- CheckBox
- ScrollView
- Switch
- Spinner
- SeekBar
- RadioGroup
- ToggleButton
- ViewPager
- RadioButton
- ProgressBar
- ListView
- GridView
- CardView
- RecyclerView
- BottomNavigationView
- TextInputLayout
- WebView
- Custom views
How would I tackle this coding problem?
Published: 2023-11-13 19:12:53

Let's say I have a list of values like this:

100
99
90
79
62
94
88
75
80
72
74
87
84
90

I would like to look for the peaks and troughs in the numbers. However, I want to ignore small movements because the data may not go down consecutively until it reaches the trough and I would like to remove the ‘noise’ from the data.

I want to ignore small changes in price that are 10% or lower than the original peak or trough. This 10% move could span over several rows, it's a cumulative move.

It’s easy to see from the data that the first trough comes at 62. That is because there is no movement that goes in the opposite direction that is over 10%

It is also easy to see the next peak because 94 is way higher than 10% and it starts moving back down after that.

However the tricky part is after 75 it goes upwards to 80 which I’d like to ignore because the next row finally reaches a trough of 72. This small upward movement isn't enough to invalidate the trend.

Then it goes to 74, 87, 84 & 90 which qualifies for a new peak because it is over 10% and doesn’t get invalidated by a 10% movement in the opposite direction.

So if I were a great programmer, I’d like to make a printout of the data like this:

First peak = 100
First trough = 62
Second peak = 94
Second trough = 72
Third peak = 90

It’s quite easy to do this as a human but I’m having a lot of trouble programming it in python. I would be extremely grateful if anyone could help me with this problem.
How to make VS Code transparent || Glassy VS code
Tags: vscode, webdev, programming, extensions
Published: 2023-11-13 18:53:13

## Make your Visual Studio Code look fantastic with the VScode transparent effect. 

{% youtube 7nOhaT_6mgE %}

If you use one of the most popular text editors - VScode, and want to use it with a transparent background, we recommend the **glassIt-VSC extension.**

It's a great extension to make your Vscode look transparent, and you can also control the transparency level. Here are specifics in the details section. 

- 
As mentioned,
 Press **"ctrl+alt+z"** to increase transparency and also 
Press **"ctrl+alt+c"** to decrease the transparency.
 It's this much simple to use.

[✅ Extension download link ](https://marketplace.visualstudio.com/items?itemName=s-nlf-fh.glassit)
🚀 안전보증놀이터 - FLASH BET, 특별한 혜택과 다채로운 게임으로 여러분을 초대합니다! 🎰
Tags: hello
Published: 2023-11-13 18:50:05


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


🎁 입플 이벤트 진행 중!

💳 신규가입 쿠폰이벤트 및 매충전 20% 무한지급 이벤트로 여러분을 환영합니다!
🌈 다양한 이벤트로 더 즐거운 게임을 즐기세요!

🔄 매충전 20% 무한지급: 매 충전 시 20%의 무한지급으로 게임을 더욱 풍성하게 즐겨보세요!
🤝 지인추천 이벤트: 지인을 초대하고 특별한 혜택을 누리세요!
📅 프리미엄 출석이벤트: 매일 출석으로 특별한 상품을 획득하세요!
🃏 에볼루션, 플레이텍 카지노 및 카지노슬롯머신 이용 가능!

🎲 미니게임 다수: MGM바카라, 파워볼, bet365 가상게임 등 다양한 미니게임으로 즐거운 시간을 보내세요.
🏀 스포츠 및 라이브배팅: 다양한 스포츠 종목에서 실시간으로 베팅하여 즐거움을 더하세요!

🌐 찾아가기: fla-k1.com
🆔 가입코드: A T

🌟 FLASH BET으로 안전하고 즐거운 게임을 경험하세요! 여러분의 행운이 가득할 것입니다. 지금 바로 참여하세요! 🚀

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/clfz4jinsshz9yjsf0hk.jpg)
Imersão Dev 7ª Edição - Projeto Aula 1
Tags: codepen, imersaodev, alura
Published: 2023-11-13 18:33:54

Mexendo um pouco com javascript/front-end. Estou mais acostumado a trabalhar com python, mas sempre é bom revisitar as bases.

{% codepen https://codepen.io/Andr-Boechat/pen/QWYMwdK %}
Raku Blog Posts 2023.46
Tags: programming, rakulang, summary
Published: 2023-11-13 18:28:27

- [Introducing Humming-Bird v3](https://dev.to/rawleyfowler/introducing-humming-bird-v3-3eni)

*Rawley Fowler* released a new major version of Raku's answer to Sinatra.

- [Getting started with Raku](https://blog.swagg.net/getting-started-with-raku)

*Swagg Boi* was pleasantly surprised by Humming-Bird and blogged about the steps necessary to make a simple web-site with it.

- [Missing Virtuousness](https://gfldex.wordpress.com/2023/11/10/missing-virtuousness/)

*Wenzel P.P. Peppmeyer* blogged about their thoughts regarding the intersection of Ranges, Junctions and hypering.

- [Integrating Large Language Models with Raku](https://rakuforprediction.wordpress.com/2023/11/11/integrating-large-language-models-with-raku-trc-2023/)

*Anton Antonov* converted their recent presentation at the Raku Conference into a blog post.

- [Junctions for Interval Arithmetic](https://rakujourney.wordpress.com/2023/11/11/junctions-for-interval-arithmetic/)

*Steve Roe* delves deeper into the potential possibilities/semantics of operations on Ranges.

- [Rakudo Weekly News 2023.46](https://rakudoweekly.blog/2023/11/13/2023-46-advent-approaching/)

*Elizabeth Mattijsen* reports on all recent developments around Rakudo, an implementation of the [Raku Programming Language](https://raku.org).
Learn C#
Tags: onlineeducation, computerscience, programming
Published: 2023-11-13 18:18:02

**Introduction**
C# is an object-oriented programming language that supports various features, including garbage collection, nullable types, and exception handling, making it a natural language for creating robust applications.
C# is the 7th most popular programming language, offering general-purpose capabilities like database work, video game graphics, audio/video effects, and device control. It's interpreted and compiled, providing excellent screen handling support for both web and desktops.

**Roadmap to learn C#**
**1.Learn the basic concepts**
Learning syntax is the fundamental foundation for any programming language, including C#, which covers variables, data types, comments, input-output, and type-conversion.
Learn syntax, branching, and looping statements to automate repetitive tasks and create flow in a program. Topics include If/Else conditions, switch statements, comparison operators, logical operators, and for loops.

**2.Learn the concept of function**
Functions group code for specific operations, allowing multiple executions without writing the same code in different sections. Arrays store data lists.

**3.Learn Object oriented programming with C#**
This section teaches about OOPS concepts, including classes, objects, access modifiers, fields, properties, constructors, "This" keyword, constructor overloading, and object dot notation.

**Top courses for C#**
This includes:
1.[C# Basics for Beginners: Learn C# Fundamentals by Coding](https://pacificmultiverse.com/course/c-basics-for-beginners-learn-c-fundamentals-by-coding/)
2.[Learn C#](https://www.codecademy.com/learn/learn-c-sharp)
3.[C# Advanced Topics: Prepare for Technical Interviews](https://www.udemy.com/course/csharp-advanced/)
Is dev.to built with ghost or discourse?
Tags: ask
Published: 2023-11-13 18:04:49

Hello dev.to memebers, I hope this message finds you well. I've been exploring the website and have been fascinated by its structure and functionality. As someone with a keen interest in web development, I am eager to learn more about how this website is made.

Specifically, I am interested in understanding the technologies, frameworks, or platforms used to create such an engaging and user-friendly forum. If there are any developers or tech enthusiasts in the community who could share some insights or guidance on how to embark on a similar project, I would greatly appreciate it.

My goal is to build a forum, and any advice, recommended resources, or personal experiences you could share would be immensely valuable.

Thank you in advance for your time and assistance. I look forward to learning from the expertise within this community.
🌟 토토사이트추천! Pong Bet - 다양한 혜택과 다채로운 게임으로 여러분을 초대합니다! 🎉
Published: 2023-11-13 18:06:36


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

🎁 입플 이벤트 진행 중!

✨ 신규가입시 첫충건 40%, 매충전 15% 이벤트로 여러분을 환영합니다!
🌈 다채로운 이벤트로 더 즐겁게 즐기세요!

🕒 투타임 이벤트: 특정 시간대에 배팅하면 더 큰 혜택이 여러분을 기다립니다!
🔄 리베이트 이벤트: 손실금액의 일부를 현금 또는 보너스로 환급받을 수 있는 리베이트 이벤트가 진행 중입니다!
🍽️ 두끼 이벤트: 배팅이 맛있게! 특별 보너스로 게임을 더욱 풍성하게 즐기세요!
🎯 다양한 배팅종목으로 즐거운 시간을 보내세요!

🏀 스포츠 및 라이브스포츠: 현장감 넘치는 스포츠와 라이브스포츠로 즐거운 시간을 보장합니다.
🎰 카지노 및 슬롯머신: 10가지 이상의 다양한 카지노 게임과 2000가지 이상의 슬롯머신이 여러분을 기다립니다.
🎲 미니게임, 토큰게임, 지뢰찾기: 다양한 미니게임과 독특한 토큰게임으로 여러분의 선택을 기다립니다!
🌐 찾아가기: pong-aa.com
🆔 가입코드: A T

🌟 토토사이트추천 Pong Bet으로 특별한 혜택과 다채로운 게임을 경험하세요! 여러분의 행운이 가득할 것입니다. 지금 바로 참여해보세요! 🚀




![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4ugtri5ae70nafjh6xh.jpg)
La era de la inteligencia artificial: Perspectivas desde TalentLand 2023
Published: 2023-11-13 17:59:08

La industria tecnológica es un campo en constante evolución, donde los avances y las innovaciones raras veces parecen detenerse. En el TalentLand 2023, uno de los eventos más esperados del año para nosotros, los apasionados de la tecnología, nos sumergimos en las tendencias, los desafíos y las oportunidades que están configurando el panorama tecnológico actual.

Durante TalentLand 2023, se pudieron presenciar avances emocionantes en el campo de la inteligencia artificial, una de las tecnologías más disruptivas y emocionantes de nuestro tiempo. Expertos y líderes de la industria presentaron casos de uso innovadores en áreas como el aprendizaje automático, el procesamiento del lenguaje natural y la visión por computadora. Tanto la industria privada como la pública presentaron aplicaciones prácticas de IA que están revolucionando industrias enteras, desde la atención médica hasta la agricultura. Prueba de ello, el estado de Jalisco presento como utilizan IA para la prevención de la Retina Diabética, un proyecto en donde se busca aumentar los índices de prevención y disminuir los recursos humanos, ya que no cuentan con el número necesario de personal para la cantidad de pacientes que atienden día con día.

Además de los avances técnicos, TalentLand 2023 también destacó el impacto de la IA en la sociedad y la ética detrás de su implementación. Hubo charlas y paneles de discusión sobre temas candentes donde se tocaron preguntas recurrentes cuando hablamos de IA y ética que reflejan el impacto y el uso responsable de la IA en diversos ámbitos. Algunas de las preguntas más comunes fueron: ¿cuáles son los posibles riesgos de la IA?, ¿cómo se puede garantizar la transparencia de los algoritmos de IA?, ¿cuáles son los sesgos en la IA y cómo pueden abordarse?, ¿quién es responsable si un sistema de IA toma una decisión perjudicial o incorrecta?, ¿es el desarrollador, el propietario, el usuario o el propio sistema?, ¿cuáles son los límites éticos de la IA?, ¿cómo se protege la privacidad de los datos en la IA?

Cada pregunta tiene un fondo muy especial, pero en resumen podemos decir que existe la necesidad de un enfoque ético en el desarrollo y la implementación de sistemas de IA para garantizar que los beneficios sean equitativos y sostenibles.

TalentLand 2023 ha sido un catalizador público para impulsar la era de la inteligencia artificial, reunió mentes brillantes y líderes del área con experiencia práctica para poder explorar las últimas tendencias y perspectivas sobre la IA. Desde los avances técnicos hasta los debates éticos, TalentLand 2023 ha brindado una plataforma para comprender y aprovechar el potencial de la IA en la transformación de la sociedad y los negocios.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wrf5uk3cuvdo4p3a710v.png)
100 lines of code per file
Published: 2023-11-01 07:05:31

It has gotten to my attention that one of the biggest dev agencies in the region has a pull-request requirement that checks whether each file committed is under 100 lines long.

It seems like a pretty stupid requirement, right?

Then I tried it.

I had a class that was 133 lines long and I want to see whether I can get it under 100. As the class was already “doing one thing” it didn’t make sense to refactor it and split it into two files.

First to go were the comments 😀 Method docblocks were replaced with proper type declarations and return types. To preserve the readability, variable and method names had to be changed to be self-explanatory although a bit longer. Conditionals were extracted into separate methods.

Multiple simple IFs were combined into one, which did hurt readability a bit but it saved 5 lines 😀

Somewhat duplicated code was extracted and parametrized which allowed me to reuse methods in several locations.

And I got to 99 lines 🚀

I was skeptical about this requirement when I started but now I see its benefits. It makes you think about your code a bit more and forces you to make it more readable while also removing clutter from your files. And as strange as this may sound, it was fun doing it 😆
"MiniScript Mentor" GPT
Tags: miniscript, programming, ai, gpt
Published: 2023-11-13 17:55:33

I'm delighted to announce that ChatGPT can now answer questions about MiniScript, or even help you with your MiniScript code, using the new **MiniScript Mentor** GPT!  Just go to:

https://chat.openai.com/g/g-i8hNNTBNy-miniscript-mentor

If you have a paid subscription to ChatGPT, you should see something like this:

![Screen shot of MiniScript Mentor GPT](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/idz27iz98l6bcna2qya2.png)

(If you are not a paid user, you may get a message saying that you don't yet have access to custom GPTs — but they claim to be rolling this out over the coming days, so hopefully this will work for you soon!)

At this point you can click one of the prompt suggestion buttons, or just type in anything.  For example, if you're new to MiniScript, you might start with "What is this language all about, anyway?"

![Screen shot of MiniScript Mentor answering the question "What is this language all about, anyway?"](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qv92j3vfnyvbfk4891rj.png)

Have a bug in your MiniScript code?  MiniScript Mentor can help with that.  (If you need to type a line break in your message, press Shift-Return instead of plain Return.)

![MiniScript Mentor correcting a bug in some code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jw10ecqeniptsdsnn9v2.png)

How is MiniScript Mentor able to do all this, you ask?  It's relying heavily on the smarts of GPT-4-Turbo (the latest large language model from OpenAI).  But it's also been given a variety of documents to learn from, including the [Quick Reference](https://miniscript.org/files/MiniScript-QuickRef.pdf), the [MiniScript User's Manual](https://miniscript.org/files/MiniScript-Manual.pdf), and even the complete text of [Learn to Code in 30 Days](https://www.amazon.com/Learn-Code-Days-Joe-Strout/dp/173616760X), among others!

As a result, at least in my limited testing so far, **MiniScript Mentor** is a pretty darn good helper for MiniScript coding.  It's no substitute for the real humans over at the [MiniScript Discord server](https://discord.gg/7s6zajx), of course... except that we all have to sleep sometimes, whereas the AI is always there for you.

What do you think?  Is this a tool you might use?  Let me know in the comments below!
SFCC Documentation: Everything You Need to Know About the Top 3 Platforms
Published: 2023-11-13 17:38:31

Top best SFCC Documentation Platform

![SFCC Documentations platforms](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f367g7gguxgye02hkc8y.jpg)

**[SFCCDocs.com](https://sfccdocs.com/)** is a comprehensive documentation platform for Salesforce Commerce Cloud (SFCC) that provides a wealth of information on the platform's features, capabilities, and best practices. It is a one-stop shop for all your SFCC documentation needs, including API references, release notes, and developer guides ¹. Additionally, SFCCDocs.com provides access to a variety of training resources, such as e-learning courses and webinars, which can help you learn more about SFCC and how to use it effectively.

**[SFCC-Doc.ni18.in](https://sfcc-doc.ni18.in)** is another SFCC documentation platform that provides detailed information on the platform's features and capabilities. It is a community-driven platform that offers a wide range of resources, including developer guides, API references, and release notes ². SFCC-Doc.ni18.in is a great resource for finding information on specific SFCC features and capabilities. The platform also offers a variety of forums and discussion groups where you can ask questions and get help from other SFCC users.

**[help.salesforce.com](https://help.salesforce.com/s/articleView?id=cc.b2c_getting_started.htm&language=en_US&type=5)** is a knowledge base that provides detailed information on various Salesforce products, including SFCC. It offers a wide range of resources, including getting-started guides, developer documentation, and release notes ³. help.salesforce.com is a good resource for finding general information about SFCC, such as how to get started with the platform and how to troubleshoot common problems. It also offers a variety of support options, such as live chat and phone support.

I hope this helps!