teleren/devto huggingface dataset:
Constant pattern haqida...
Tags: dotnet, csharp
Published: 2022-05-30 04:34:45

C# 7.0 dan boshlab, switchga parametr qilib berilgan qiymatni  belgilangan konstantaga teng yoki yo'qligini tekshirish uchun constant patterndan foydalanishimiz mumkinakan:

```
public static decimal GetGroupTicketPrice(int visitorCount) => visitorCount switch
{
    1 => 12.0m,
    2 => 20.0m,
    3 => 27.0m,
    4 => 32.0m,
    0 => 0.0m,
    _ => throw new ArgumentException($"Not supported number of visitors: {visitorCount}", nameof(visitorCount)),
};
```
Constant patternda switchga parametr qib berilgan qiymatni mamnaqa tipla bilan solishtirish mumkinakan anaqqisa 👇:

- Integer yoki floating-point sonlar
- Char yoki a string literal
- Boolean qiymat true yoki false
- Enum value
- e'lon qilingan const maydoni yoki mahalliy nomi
- null

tepadigi misoldaka qilib ko'rsataman:
```
  public static decimal GetGroupTicketPrice(object visitorCount) => visitorCount switch
    {
         1 => 15.0m,         // int qiymat bilan solishtirvotti
        "string" => 12.0m,   // string qiymat bilan solishtirvotti
        'a' => 20.0m,        // char qiymat bilan solishtirvotti
        true => 27.0m,       // bool qiymat bilan
        "enum" => 32.0m,     // enum qiymat 
        null => null,        // null bilan
        0 => 0.0m,           // buyam int qiymat bn soliwtirvotti
        _ => throw new ArgumentException($"Not supported number of visitors: {visitorCount}", nameof(visitorCount)),
    };
```

Constant patterndan nullni tekshirishda ham foydalaniladi:
```
if (input is null)
{
    return;
}
```
C# 9.0 dan boshlab, quyidagi misolda ko'rsatilgandaka, null bo'lmaganni tekshirish uchun negated null qilib tekwiriladi:
```
if (input is not null)
{
    // ...
}
```
Uncha chunmagan bo'sela mamyaqqa o'tib ko'rvosela bo'ladi [constant pattern](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-8.0/patterns#constant-pattern)!
Tempat Wisata Terbaik di Pulau Kalimantan
Tags: wisata, travel
Published: 2022-05-30 04:17:01

Pulau kalimantan dikenal juga dengan julukan "Pulau Seribu Sungai" hal tersebut dikarenakan pulau ini memiliki banyak sekali sungai. Selain itu juga, kalimantan terkenal akan hutan yang lebat terutama hutan trofisnya, yang menjadikan pulau ini di sebut juga sebagai paru-parunya indonesia. Meskipun memiliki hutan yang amat lebat, akan tetapi bukan berarti pulau ini tidak memiliki perkotaan yang maju. Di pulau ini juga terdapat beberapa kota maju sama halnya di pulau jawa, bahkan kota di kalimantan mendapatkan julukan sebagai kota terbersih se-asia tenggara.

Selain itu pulau kalimantan juga terkenal kaya akan sumber daya alamnya. sumber daya alam yang melimpah bisa ditemukan di pulau ini, mulai dari hasil hutan, perkebunan, dan hasil tambang minyak dan gas alam. Pulau ini juga memiliki banyak objek wisata yang terkenal dan menarik. Nah bagi sobat yang memiliki hobi trekking dan berpetualang, pulau kalimantan menjadi salah satu tempat yang cocok untuk sobat kunjungi untuk menghabiskan waktu libur sobat sembari menghilangkan rasa penat. 

Bagi sobat yang berniat atau akan menghabiskan waktu untuk berlibur di pulau kalimantan dan kebingungan mencari destinasi tempat yang akan di tuju maka sobat tidak perlu khawatir, karena tim kami sudah merangkum dan mencatatnya beberapa tempat wisata terbaik dan juga terkenal yang ada di pulau kalimantan yang cocok untuk berlibur. untuk melihat di mana saja tempat terbaik dan terkenal di pulau kalimantan tersebut, sobat bisa langsung lihat pada link yang kami cantumkan di bawah ini.

Link : https://www.bangnanda.com/
4 Dicas para as Futuras Pessoas Desenvolvedoras de Software
Tags: aprendizado, carreira, dicas
Published: 2022-05-30 04:13:02

---
title: 4 Dicas para as Futuras Pessoas Desenvolvedoras de Software
published: true
description: 4 dicas de um desenvolvedor de software sênior para pessoas que estão começando a atuar na área ou estudando para isso.
tags: aprendizado, carreira, dicas
//cover_image: https://direct_url_to_image.jpg
---

## 1. Se aprofunde nos conhecimentos mais fundamentais

Ao estudar sobre desenvolvimento de software é normal se sentir perdido porque existe todo um universo de conteúdo. Porém é importante se aprofundar nos conhecimentos que são mais fundamentais, porque eles ajudam a entender os outros.

Isso porque os conhecimentos estão relacionados e muitas vezes até se compõe. Então ao aprender mais profundamente um conteúdo você, por tabela, aprende e/ou tem mais facilidade de aprender vários outros.

E depois de construir um repertório sólido com os conhecimentos mais fundamentais você provavelmente vai estudar outras ferramentas, técnicas etc. conforme a sua demanda e necessidade.

## 2. Valorize seu repertório de conhecimento

Por existir tanto conteúdo, a [síndrome do impostor](https://pt.wikipedia.org/wiki/S%C3%ADndrome_do_impostor) é praticamente uma regra aos profissionais da área porque ninguém sabe tudo. E é difícil ter a percepção de todo repertório de conhecimento que você constrói ao longo do tempo.

Então é importante ter na cabeça que no dia-a-dia o seu repertório e o das demais pessoas com quem você trabalha vão se complementar para chegar nas soluções.

## 3. Ganhe segurança conhecendo pessoas da área e se ambientando com o trabalho

Por melhor que seja o curso que você está fazendo, vai existir um _gap_ entre o que você vai aprender nele e o dia-a-dia trabalhando na área de desenvolvimento de software. Por isso é importante participar de comunidades e eventos (_meetups_ e _hackathons_ por exemplo) para conhecer pessoas da área, ferramentas e, de forma geral, se ambientar e ganhar segurança com o trabalho de pessoa desenvolvedora de software.

E, se a sua realidade permitir, vale participar de programas de _summer jobs_ ou estágios que são a forma ainda mais eficiente de se ambientar com o trabalho e ganhar segurança.

## 4. Trabalhe em projetos pessoais

É importante dedicar algum tempo para projetos pessoais. Porque trabalhar em aplicações, bibliotecas, experimentos próprios ajudam a fixar os conhecimentos e a se desafiar a aprender coisas novas. E vale usar ferramentas como o [GitHub](https://github.com/), o [CodePen](https://codepen.io/) etc. para publicar esses projetos pessoais e, de quebra, interagir com a comunidade.

[Aprender em público](https://www.swyx.io/learn-in-public/) também pode ser interessante porque faz com que você se force a sintetizar seus conhecimentos de uma forma organizada para poder compartilha-los.
Recommended way of creating software
Published: 2022-05-30 03:46:34

Inspired from some talks and books, here is the framework I would define

Part I
- Write some tests of the part of the feature you want to make
- Make the tests fail (duh! there is no code to pass it)
- Write minimum code to pass the test cases
- Refactor

Part II
From OOA & D book
- Make the software/feature do what the customer wants it to do
- Apply OO principles to add flexibility
- Strive for a maintainable & flexible design

From Part I and Part II, the point 1 would correlate with Part I, points 1 & 2,  Part II points 2,3 would correlate with Part I point 3, the refactor phase.
Serverless computing is a cloud computing execution model
Tags: aws, serverless
Published: 2022-05-30 03:46:28

Serverless computing is the process by  which the cloud provider allocates machine resources on demand, taking care of the servers on behalf of their customers. Serverless computing does not hold resources in volatile memory; computing is rather done in short bursts with the results persisted to storage. [Gatner.com](https://www.cloudbolt.io/gartner-magic-quadrant-cloud-evaluating-top-six-iaas-providers/#:~:text=Gartner%20Magic%20Quadrant%20for%20Cloud%3A%20Evaluating%20the%20Top,Cloud.%20...%205%20Oracle.%20...%206%20IBM.%20) ranked AWS as world’s leading cloud service provider. 



Interested in learning about serverless computing self enroll for this 5minutes course to learn more. https://explore.skillbuilder.aws/learn/course/37/introduction-to-serverless-development
VS Code Tip of the Week: Find in Folder
Tags: vscode, vscodetips
Published: 2022-05-30 03:45:09

This week's tip of the week is care of Justin Noel. Justin is in my Virtual Coffee community. Yesterday, during a Lunch & Learn we had, he mentioned that you can search in only a specific folder in VS Code. I was completely unaware of this.

The flow with your mouse is to right-click on the folder and select `Find in Folder...`

![Context menu open on a folder with the option Find in Folder... highlighted](https://community.vscodetips.com/uploads/articles/wyutoaledg7ltso400wu.png)
 
You can also have focus on a folder in the sidebar and then do <kbd>⌥</kbd> (Option) + <kbd>Shift</kbd> + <kbd>F</kbd> for macOS or <kbd>Alt</kbd> + <kbd>Shift</kbd> + <kbd>F</kbd> for any other operating system supported by VS Code.

Both will bring you to the search panel but notice that now it only includes any files in the given folder.

![Search panel in VS Code with the current folder files as the files to include in the search](https://community.vscodetips.com/uploads/articles/8ii1gdnhq6v55ef7qm9q.png)

Great tip Justin, and Happy VS Coding!
Create next generation game experiences with AWS
Tags: aws, games, gamedev
Published: 2022-05-30 03:38:34

AWS for Games keeps creating new tools and technology through innovations to help game developers to embrace industry wide transformation with latest tools and Technology. Click on the below links to learn more about how you can build and develop tools in the best way possible. 


Cloud Game Development: https://aws.amazon.com/gametech/remote-game-production/

Game Servers:  https://aws.amazon.com/gametech/game-servers-networking/

Live Operations: https://aws.amazon.com/gamesparks/

Game Analytics: https://aws.amazon.com/gametech/analytics/

Game Security: https://aws.amazon.com/gametech/security/

AI and Machine Learning for Games: https://aws.amazon.com/gametech/ai-machine-learning/
Top 10 Programming Languages in 2022- Codexashish
Tags: python, php, java, javascript
Published: 2022-05-30 03:21:31

**Here is the list of the top 10 programming languages you must learn in 2022 for better growth.**

In this blog, we will discuss some of the most in-demand programming languages which will be dominant this year, 2022. So let's start to learn the top 10 programming languages in 2022. These programming languages are more demanding and most paying as of now. So let’s get started with these top programming languages:

## No.1: Python Programming
Python is one of the most popular programming languages today and will continue in 2022 which was developed in 1991.

**Features of Python Programming:-**

- High-Level
- Easy to learn
- Open source
- Popular
- Object oriented programming
- General-purpose programming language


**Applications of Python Programming:-**

- Web-apps
- Data science
- Machine learning
- Web development
- Artificial Intelligence
- Game development
- Data visualization
- Web scraping application


## No.2: JavaScript
JavaScript, sometimes known as JS, was developed in 1995 that follows the ECMAScript standard. 

**Features of JavaScript:-**

- High-Level
- Dynamic typing
- Frequently compiled
- Popular
- Platform-independent language


**Applications of JavaScript:-**

- Web development
- Web servers development
- Game development
- Mobile application
- Server application
- Robotics
- Machine Learning - Tensorflow.js 
- Video Production - Remotion 
- SmartWatch Apps - Pebble.js or Bangle.js 
- Infrastructure - AWS CDK 
- Image Editing Controlling drones - I guess under robotics
- Animations - Three.js 
- Presentations/Slides - RevealJS 
- Desktop Apps - ElectronJS 
- AR/VR - A-Frame


## No.3: Java
Java is an object-oriented programming language that was developed in 1995.

**Features Java Programming:-**

- Object-oriented
- High-level
- Platform-independent
- Robust programming languages
- Secure
- Easy to learn


**Applications of Java Programming:-**

- Mobile applications
- Cloud-based applications
- Gaming application
- Desktop GUI application
- Web application


## No.4: C/C++
C and C++ have a significant presence in the world of programming, C language was developed in 1970 and C++ was developed in 1998.

**Features of C Programming:-**

- Easy to learn
- Browser support
- Simple


**Features of C++ Programming:-**

- Object oriented programming
- Popular
- Easy to learn
- Browser support


**Applications of C Programming:-**

- Design Operating system
- Design browser
- Game development
- Animation
- Computer design


**Applications of C++ Programming:**

- Design operating system
- Development of new language
- Games development
- Design browser
- Database software
- Graphics 

## 
[Click Here to read more](https://www.codexashish.com/2021/12/top-10-programming-languages-you-must.html)

**Thankyou 
Codexashish**
Nora | Made with Next JS
Published: 2022-05-30 02:56:30

![Nora | Made with Javascript | Next JS](https://res.cloudinary.com/madewithjavascript/image/upload/v1653325375/large_nora_made_with_next_js_b5096e7ba2.jpg "Nora | Made with Javascript | Next JS")


### Project Management Template for Notion

> Never rebuild project management system in your Notion again by using a Notion template that solves painful problems of project management in Notion instead of looking beautiful.
> 
> ### Notion template to solve painful problems of project management in Notion instead of looking beautiful.
> - Create & manage sub-issues
> - Auto-estimate due date
> - Track progress across projects, sprints & tasks
> - Suggest what to do
> - Smart outdated tasks
> 

## Check out more such amazing projects on our website

[Made with Javascript](https://madewithjavascript.club)

## Want us to feature your project

[Submit your Project to Made with Javascript](https://madewithjavascript.club/submit-project)


You can also write to us for any of your queries at:

[Email Made with Javascript](mailto:madewithjavascript@gmail.com)

## Project already shared on our social media handles.

| SocialMedia | SharedLink |
| ----------- | ---------- |
| Twitter | [Nora on Twitter](https://twitter.com/withjavascript/status/1531106437505724417?s=20&t=XpYWQlktow1m_QelG1oCDQ)
 |
| Medium | [Nora on Medium](https://medium.com/@madewithjavascript/nora-made-with-next-js-561916d97e56)
 |
| Facebook | [Nora on Facebook](https://www.facebook.com/madewithjavascript/posts/pfbid02FXjAkzpe6FEoeN961g4PZfsCaUzYgHaGZ5fB2HqhsVVHw3McQEVygkP9AU5JVYcNl)
 |
| Tumblr | [Nora on Tumblr](https://madewithjavascript.tumblr.com/post/685642125120012288/nora-made-with-next-js-project-management)
 |
| LinkedIn | [Nora on LinkedIn](https://www.linkedin.com/feed/update/urn:li:activity:6936872312482799616)
 |

Filled Under:
 - [Made with Javascript](https://madewithjavascript.club)  
 - [Made with Next JS](https://madewithjavascript.club/categories/next-js)

Make sure to give this post ❤ 50 ❤ hearts, click the 🦄 unicorns 🦄 and follow 👉 @madewithjavascript 👈 for more such awesome showcases. Show you love for the people who have worked so hard!
Strapi Authentication via Provider
Tags: strapi, cognito, jwt
Published: 2022-05-30 02:56:01

If you use a 3rd party provider in Strapi for authentication, the access token works a little differently.

The access token that you receive from cognito is not valid in Strapi. You need to retrieve a token from strapi.

From the frontend app, read the query string from cognito after successful authentication and submit both the id_token and access_token to this Strapi endpoint.

If you are using the AWS Amplify SDK, Auth.currentSession() will return a CognitoUserSession containing the accessToken and idToken.

```
const data = await Auth.currentSession()
const access_token = data.accessToken.jwtToken
const id_token = data.idToken.jwtToken
```

Send both Cognito tokens to the callback URL so that you can get a Strapi JWT that you can then use for all subsequent calls to Strapi. By calling this URL, Strapi will automatically create a new record in the User table.

`${backendUrl}/api/auth/${params.providerName}/callback?id_token=xxx&access_token=yyy`

You will receive the following response.

```json
{
"jwt": "<access token> that you can use thereafter",
"user": {
  "id": 1,
  "username": "google_999999999999999999",
  "email": "theuser@gmail.com",
  "provider": "cognito",
  "confirmed": true,
  "blocked": false,
  "createdAt": "2022-05-30T02:50:08.907Z",
  "updatedAt": "2022-05-30T02:50:08.907Z"
}
}
```
Clojure Tutorial Part 1 -- CLI 起動と文字列の出力
Tags: clojure
Published: 2022-05-30 02:49:33


## そもそも Clojure とは？

https://gimo.jp/glossary/details/clojure.html

- Lisp の亜種(記法がほぼ同じ)
- 関数型 (クラス型ではない)
- Java の API (ライブラリ?) が使える

と言った特徴を持つ言語のようだ

https://openstandia.jp/oss_info/clojure/

NRI の情報が読みやすい

## CLI で単純に起動して文字列の出力を試す。

https://clojure.org/guides/repl/launching_a_basic_repl

```php
clj
Downloading: org/clojure/clojure/1.11.1/clojure-1.11.1.pom from central
...
Clojure 1.11.1
user=> 
```

clj コマンドで CLI は起動する。

```php
user=> (println "Hello Clojure")
Hello Clojure
nil
```

丸カッコで括って println で文字列を渡すと
出力されて、nill (null の代わりと推測) が返ってくる。

---

## leingen や boot, jar での起動を知る

https://clojure.org/guides/repl/launching_a_basic_repl#_using_a_project_management_tool

leingen を使うとディレクトリの内部のライブラリを使って動かしてくれるようだ。

boot を使うとサーバーを起動しながら動かせるらしい。

そして java -jar を使うと jar ファイルから起動できるらしい。

```php
java -jar clojure.jar
Error: Unable to access jarfile clojure.jar
```

jar ファイルはなかったので使えなかった。

---

## まとめ

Clojure は clj コマンドで CLI 起動できる。

`()` で括ってから java のように println で出力できる。

leingen や boot, jar　などのツールでも起動できる。
Imposter Me
Published: 2022-05-30 02:32:35


![Imposter Syndrome Thoughts](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gjln8ojne378dtjt3xyb.png)

I've been out of bootcamp a couple of months now. I've always heard once you get out it's a completely different world.
They were right. 

## The Struggle
All of a sudden I miss the structure of having a roadmap of lessons, guidelines for projects and teachers there to help you get unstuck. 

One of the biggest struggles is dealing with imposter syndrome. 
For some who may have not heard the term before. Long story short it's just like it sounds. Feeling like you don't belong or know what your doing. 
You doubt your skills, or accomplishments and abilities. 

##The Fight 
Learning to navigate through picking my own projects to focus on developing certain skills. Learning how to solve algorithms for now and moving onto learning data structures. I am reminded everyone was once in my shoes and made it. 

Imposter Syndrome is real for all of us and we all will go through it over the course of our journey. But understanding how to recognize it and have the tools to deal with it is important.   

##Overcoming The Struggle 
One of the biggest ways I've been working through overcoming the feeling of imposter syndrome is: 
1. Review old projects
Looking at old project and reading through the code. Following the code flow. Updating the code. Loading the project and playing around with it. 
2. Helping other's 
Finding a coding community and helping a new coder solve simple problems. Contributing to an open source project is a great way to get involved as well.  
3. Go back to the basic and resolve old problems with a different solution. 
This will show you how much you have learned from then until now. Finding a different solution will also help you get a better grasp on concepts and grow your knowledge. 


![One Step Forward](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/627ndwsf71yvi5p9msvs.jpeg)
**ONE STEP FORWARD IS A STEP WORTH TAKING IN THE RIGHT DIRECTION NO MATTER HOW BIG OR SMALL IT IS**

I hope these tips help no matter where you are in your coding journey. 

Never Give Up. You are never in this alone. 

Happy Coding 👨🏿‍💻👨🏻‍💻🧑🏾‍💻👩🏾‍💻👩‍💻
Clojure Tutorial Part 0 -- 環境構築 clojure tools と Temurin を入れる。
Tags: clojure, java
Published: 2022-05-30 02:32:24


## 前提

M1 Mac

macOS Monterey ver 12.4

で brew で内部にインストールする。

---

## arm64 の brew で clojure/tools/clojure をインストール

https://clojure.org/guides/install_clojure

clojure 公式のドキュメントを参考にする

```php
brew --version
Homebrew 3.2.16
```

まず brew が入っているかチェック

```php
arch -arm64 brew install clojure/tools/clojure
```

arm64 明記で clojure tools をインストールする。

この時点で clj コマンドが使えたかどうかは未検証。

---

## java 17 のために cask で Temurin 17 を入れる。

https://qiita.com/tearoom6/items/1abf24ca6d872e6579b0#brew-tap

tap は非公式の brew ツールをインストールするコマンドらしい。

https://eng.shibuya24.info/entry/homebrew-cask

cask は GUI アプリを brew で入れるためのツールらしい。

```php
brew tap homebrew/cask-versions
...
Resolving deltas: 100% (170387/170387), done.
Tapped 219 casks (249 files, 70MB).
```

これで cask を使えるようにして

```php
brew install --cask temurin17
...
==> Installing Cask temurin17

installer: Package name is Eclipse Temurin
installer: Installing at base path /
installer: The install was successful.
🍺  temurin17 was successfully installed!
```

temurin の 17 がインストールされた。

```php
java --version
openjdk 17.0.3 2022-04-19
OpenJDK Runtime Environment Temurin-17.0.3+7 (build 17.0.3+7)
OpenJDK 64-Bit Server VM Temurin-17.0.3+7 (build 17.0.3+7, mixed mode, sharing)
```

java のバージョンを見てみる。
ちゃんとさっき入れた Temurin 17 で入っている。
Java も 17 になっている。

JAVA_HOME は表示できないのが少し不安。

---

## clojure のバージョンを確認

```php
clj --version 
Clojure CLI version 1.11.1.1113
```

clj または clojure コマンドで
Clojure CLI の 1.11 が入っていることを確認できた。

Clojure の環境構築はとりあえず終わったと解釈する

---

## まとめ

M1 Mac で Clojure を入れるためには

arm64 brew で clojure/tools/clojure を入れて

brew (cask) で Temurin 17 を入れる。

すると java 17 が入って clojure コマンドが使えるようになる。
Ethernaut系列-Level 17(Recovery)
Published: 2022-05-30 01:20:05

## LEVEL 17 （Recovery）:
```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

import '@openzeppelin/contracts/math/SafeMath.sol';

contract Recovery {

  //generate tokens
  function generateToken(string memory _name, uint256 _initialSupply) public {
    new SimpleToken(_name, msg.sender, _initialSupply);
  
  }
}

contract SimpleToken {

  using SafeMath for uint256;
  // public variables
  string public name;
  mapping (address => uint) public balances;

  // constructor
  constructor(string memory _name, address _creator, uint256 _initialSupply) public {
    name = _name;
    balances[_creator] = _initialSupply;
  }

  // collect ether in return for tokens
  receive() external payable {
    balances[msg.sender] = msg.value.mul(10);
  }

  // allow transfers of tokens
  function transfer(address _to, uint _amount) public { 
    require(balances[msg.sender] >= _amount);
    balances[msg.sender] = balances[msg.sender].sub(_amount);
    balances[_to] = _amount;
  }

  // clean up after ourselves
  function destroy(address payable _to) public {
    selfdestruct(_to);
  }
}
```
## 通关要求
  找到token的地址，并取回0.001ETH

##要点
  1.熟悉https://rinkeby.etherscan.io/
  2.selfdestruct的作用

##解题思路
区块链的事务都有记录在链上，通过相应的工具都可以查看如etherscan.io
通过instance的地址，在网站上找到对应的内部事务(创建合约和转账0.001ETH的地址)，就是那个合约地址，然后调用这个地址的destroy
```javascript
  it("attacks", async function () {
    //真实的SimpleToken地址可以通过https://rinkeby.etherscan.io/
    //查询对应的instance的事务里面的创建合同，并往哪个地址转了0.001ETH，就是那个合同地址
    const tokenAddress = levelContract.address;
    const contract = await ethers.getContractAt("SimpleToken", tokenAddress);
    await contract.connect(levelOwner).destroy(player.address);
  });
```
Hibernate - @Formula
Tags: hibernate, java, database
Published: 2022-05-30 02:15:04

## Formula Annotation
The @Formula annotation is used to calculate the dynamic value of a property. @Formula takes an expression (this could be simple expression or a complex query) as a parameter. During fetch time, it evaluates the expression and assigns the evaluated value to the property.

## Examples
```
// ex 1
@Formula("lower(datediff(curdate(), birth_date / 365)")
private int age;

// ex 2
@Formula("(select min(s.survey) from statistics s) ")
private float total;

// ex 3
private int num1;
private int num2;
private int num3;

@Formula(" num1 + num2 + num3")
private float totalSum;

```

**Note:**
-This is only inserted in a SELECT clause!
-Be careful when using this because the SQL command you may be using may be vendor specific. In other words, this will create coupling with a particular SQL vendor.