teleren/devto huggingface dataset:
Path Sum | LeetCode | Java
Tags: java, leetcode, beginners, algorithms
Published: 2024-04-19 04:01:24

According to the problem we have to find the sum from every root-to-leaf path and check whether it is equal to the targetSum.
So, the intuitive code will be

``` java
class Solution {
    public boolean hasPathSum(TreeNode root, int targetSum) {
        return pathSum(root, 0, targetSum);
    }
    
    boolean pathSum(TreeNode node, int sum, int targetSum){
        if(node==null)
            return false;
        
        sum += node.val;
        
        if(sum==targetSum)
            return true;
        
        return pathSum(node.left, sum, targetSum) || pathSum(node.right, sum, targetSum);
        
    }
}
```



### Verdict : 100 / 117 test cases passed.

### Hidden test case gives the clear picture of the entirety of the question.


![Hidden test case](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k05uw7vph4s79gr45kf3.jpeg)

Our sum should not be just based on node value but root-to-leaf path.
After reaching the leaf node only are we allowed to take the sum of it.
So, the code modifies slightly.


``` java
class Solution {
    public boolean hasPathSum(TreeNode root, int targetSum) {
        return pathSum(root, 0, targetSum);
    }
    
    boolean pathSum(TreeNode node, int sum, int targetSum){
        if(node==null)
            return false;
        
        sum += node.val;
        
		//we are adding the condition to identify leaf node. If node.left and node.right==null indicates the "Leaf Node"
		
        if(node.left==null && node.right==null && sum==targetSum)
            return true;
        
        return pathSum(node.left, sum, targetSum) || pathSum(node.right, sum, targetSum);
        
    }
}

```


_Thanks for reading :)
Feel free to comment and like the post if you found it helpful
Follow for more 🤝 && Happy Coding 🚀_

If you enjoy my content, support me by following me on my other socials:
https://linktr.ee/tanujav7
Bloggers are important! 
Tags: motivation, writing
Published: 2019-12-20 14:04:01


Why? Because they are the risk takers, the front liners, those who experience things so you don't have to experience them. and I'm literally thankful for that.

There are so many times they had helped me, and I'm sure they had helped you too!

## How do they do it?

![Casey Neistat](https://cdn1.thr.com/sites/default/files/imagecache/landscape_928x523/2015/08/casey_neistat_h_15.jpg)

![Mark Rober](https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fresources.stuff.co.nz%2Fcontent%2Fdam%2Fimages%2F1%2Fj%2Ft%2Fh%2Fp%2Fx%2Fimage.related.StuffLandscapeSixteenByNine.620x349.1jteur.png%2F1497574086213.jpg&f=1&nofb=1)

![Marque Brownlee](https://pbs.twimg.com/profile_images/1094044059822448640/BvJ8T3jO_400x400.jpg)

### By passing down Wisdom!!

> " Wisdom, something you wont achieve by looking, but by **experiencing** "


## And You Can Too!  

 truly a new form of way to pass down wisdom, can be accessible to anyone!

*Want to start a podcast?*  
   **get your phone and start recording!**

*Want to Vlog?*  
  **Get your phone and start videoing!**

*Want to blog?*  
  **Go to Medium and start publishing!**

## My personal Goal

I want to be an inspiration to others to do **more**!

I want others to read, hear, and watch me do things, to inspire them to do the same, to do **more**!

I want to return the favor to the community.

> Don't settle for great, when you can have the best!
 - quote from Sony Experia

I want to share my new learning to be a motivation to hunger your taste for something new, to contribute the sea of knowledge, and understand via [Feynman technique](https://collegeinfogeek.com/feynman-technique/). Because I believe that the person next to you, your neighbor, your classmate, you parents, your siblings or just the boy across the street. Needs you to share your learning, your experience, because I know, surely, we can help them. 

## Whats yours?
Operators in C#
Published: 2024-04-19 03:58:08

## Assignment operator (=)
Vazifasi o'ng tomondagi qiymatni chap tomonga o'zlashtirishdan iborat.
Bu operatorni chap tarafida doim o'zgaruvchi turadi.
_variable=value|variable|expression_

```
var a = 10;  //variable=value
var c = a;   //variable=variable
var c=a+b*10; //variable=expression
```
    **//Compound Assignment Operators**

```
a +=10;   //a=a+10;
a -=10;   //a=a-10;
a *=10;   //a=a*10;
a %=10;   //a=a%10;

```
     **//Increment/Decrement**
Faqatgina sonning qiymatini 1 ga oshirish yoki kamaytirish uchun ishlatiladi.
```
a++;
a--;
```
**Postfix increment/decrement**
Avval amalni bajarib,so'ngra qiymatni 1 ga oshirish/kamaytirish.
Agar **++/--** expression ichida o'zgaruvchidan keyin kelsa,bu amal boshqa operatsiyalardan keyin bajariladi.
```
a=0;
var son = a++;
Console.WriteLine(a);  // 1
Console.WriteLine(son); // 0
```
Bu yerda o'zlashtirish amali bajarilib,keyin increment/decrement amali bajariladi.
 **Prefix increment/decrement**
Qiymatni avval 1 ga oshirish/kamaytirish va keyin boshqa amallarni bajarish

```
a=0;
var son = ++a;
Console.WriteLine(a);  // 1
Console.WriteLine(son); //1
```

```
var x = 0;
var y = 0;
var z = 0;

z = ++x + y++;
Console.WriteLine(x);  //1
Console.WriteLine(y);  //1
Console.WriteLine(z);  //1
```
Tepadagi dasturga qaraydigan bo'lsak,barcha natijalar 1 chiqqanini guvohi bo'lamiz.Bunda amallar ketma-ketligi quyidagicha bajariladi:
1.Avval x ni qiymati 1 oshiradi
2.Keyin 1 ga y ni qiymati ya'ni 0 ni qo'shadi.
3.So'ngra yig'dini z ga o'zlashtiradi
4.Eng oxirida y ni qiymatini 1 ga oshiradi.
   **//Chain assignment**
O'ngdan chapga qarab amallarni bajaradi.

```
x = y = z = 15;
```

## Arithmetic Operators (+,-,*,/,%)

```
Console.WriteLine(10+5);
Console.WriteLine(10-5);
Console.WriteLine(10*5);
Console.WriteLine(10/5);
Console.WriteLine(10%5);

```
   //Integer division-butun bo'lish
Butun sonni butun songa bo'lganda,natija ham butun son chiqadi

```
var son = 10/3;     //3
var son1 = 10.3/3   //3.333333
```

## Comparison Operators 
1.Qiymatlarni solishtiradi va true/false qiymat qaytaradi

```
a = 5;
b = 10;
Console.WriteLine(a > b);   //false
Console.WriteLine(a >= b);   //false
Console.WriteLine(a < b);   //true
Console.WriteLine(a <= b);   //true
Console.WriteLine(a == b);   //false
Console.WriteLine(a != b);   //true
```

## Logical Operators

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

**//Compound **
Bitta belgi o'qing.Agar belgi harf bo'lsa `True` yo'qsa `False`deb chop eting.

```
var belgi = (char)Console.Read();
var kichikHarfmi = belgi >= 'a' && belgi < = 'z';
var kattaHarfmi = belgi >= 65 && belgi <=90;
var harfmi = kichikHarfmi || kattaHarfmi;

Console.WriteLine(kichikHarfmi);
Console.WriteLine(kattaHarfmi);
Console.WriteLine(harfmi);

```

## Ternary Operator
3 ta qismdan iborat:`Condition ? true_value : false_value`
Agar condition bararilsa _True_ qiymat qaytaradi,aks holda _False_ qiymat qaytaradi.

```
var i = int.Parse(Console.ReadLine());
var j = int.Parse(Console.ReadLine());

var kattasi = i > j ? i : j;
Console.WriteLine(kattasi);

```
Cypress For Test Automation: A Step-by-Step Guide For E2E And Cypress Cucumber
Tags: javascript, testing, beginners, qa
Published: 2024-04-19 03:55:43

if you're just starting to learn about Cypress.io, a testing framework for web applications, then the mentioned blogs will provide valuable assistance and guidance.

Cypress For Test Automation: A Step-by-Step Guide
https://testgrid.io/blog/cypress-testing/

Cypress with Cucumber for Seamless End-to-End Testing
https://testgrid.io/blog/cypress-with-cucumber/
Coze AI Bot Challenge
Tags: ai, aibot, bot
Published: 2024-04-19 03:45:57

A challenge all about bots and building plugins or workflows related to bots!

Running through April 28, the Coze AI Bot Challenge will be an opportunity to try a bot development platform, build on top of GPT-4 for free, deploy something powerful, and win cash prizes. There are two prompts for this challenge, but four ways to win!

Coze offers a low barrier way for developers to leverage AI models and build something incredible, so no matter your experience level, we really hope you give this a try!

In addition to being able to win each prompt, there are two more prize categories you can work towards:

Most Popular: awarded to a top submission with a high number of users.
Most Creative: awarded to a top submission with a unique and creative use case.
Pro Tip: get your submissions in early so you can get your project in the hands of users, sooner! If you're building a chatbot, we encourage you to deploy your project across social platforms and messaging apps like Discord, Telegram, and Slack so your friends and family can interact with your bot!

Our four winners will receive the following prizes:

Prompt Winners (2)

$1,000 USD Gift Card or Equivalent
Exclusive DEV Badge
A gift from the DEV Shop
Additional Prize Category Winners (2)

$500 USD Gift Card or Equivalent
Exclusive DEV Badge
A gift from the DEV Shop
All Participants with a valid submission will receive a completion badge on their DEV profile.

Need Inspiration, Feedback, or Help?
The Coze Team will be live demoing and building a bot right on the DEV homepage on Monday, April 22 at 2pm PDT. They’ll be walking through the whole process from start to finish, and it will be a perfect opportunity to get to know the Coze Development Platform and ask questions.

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


If you can’t catch the livestream, you can still get to know the Coze platform by utilizing their documentation and tutorials:

Developer Docs
Tutorial Videos
We also encourage all participants to join the Coze Discord Community as a place to share your projects, get feedback, and ask for help.
Read more- https://dev.to/challenges/coze
The full Java developer manual of the productivity application RunFlow
Tags: java, productivity, developer, tooling
Published: 2024-04-19 03:45:46

This manual is writing for Java developers, if you are not a Java developer, you can read our [developer manual](https://github.com/myrestop/myblog/blob/master/runflow_developer_point.md). Of course, you can continue reading if you are interested.

> Typing `qe` to enter the focused mode of QLExpress.

### Executing Java Code

for math example: `Math.sin(9);`

![qe_math](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ehqmc9y3iobxd6cdkwvw.png)

> Running result: `0.4121184852417566`.

for reading system environment variables example: `top.myrest.myflow.util.Jackson.INSTANCE.toJsonString(System.getenv(), true);`

![qe_system](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88tk2lr0vii78ufwf29v.png)

> Of course, you can also format it as yaml: `top.myrest.myflow.util.Jackson.INSTANCE.toYamlString(System.getenv());`.

### Verifying Methods

Sometimes, because some tooling classes have so many methods, and you are not sure which one to use, so we need to verify the execution result of the method, for example:

![qe_hutool](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hvbimc8hj3ewlrjuhqg7.png)

### Thanks

`QLEpress` brings you the ability to execute Java code at RunFlow runtime, we support execute script file which written by QLExpress syntax, [click here to learn QLExpress syntax](https://github.com/alibaba/QLExpress). 

Meanwhile, we support develop plugin through QLExpress, [click here to learn how to develop plugin with QLExpress](https://myrest.top/guide/myflow/plugin#/general-plugin-guide/general_guide?id=general-plugin-guide). Certainly, you will get better interaction capabilities if you use Java to develop plugins, [welcome to click here to read our Java guide](https://myrest.top/guide/myflow/plugin#/jar-plugin-guide/jar_guide?id=jar-plugin-guide).
Angular Signals Base untracked function
Tags: programming, angular, beginners
Published: 2024-04-19 03:20:49

The Angular Signals [computed](https://angular.dev/guide/signals#computed-signals) function is used to derive values from any number of signals. 

[Computed signal](https://angular.dev/guide/signals#computed-signals) are read-only signals that derive their value from other signals.

We can define computed signals using the computed function and specifying a derivation. For instance:

```ts
firstName = signal('Signals');
lastName = signal('Test');
fullName = computed(() => this.firstName() + ' ' + this.lastName());
```

In the above example, changing the value of either **firstName** or **lastName** will automatically update the value of **fullName**.

What if we wanted fullName to update only when **fistName** changes but not when **lastName** changes?

The solution to that problem is a function called [untracked](https://angular.dev/guide/signals#reading-without-tracking-dependencies):

```ts
fullNameUntracked = computed(() => this.firstName() + ' ' + untracked(() => this.lastName()));
```

The **untracked** function allows us to read the value of a signal without making such signal a dependency of our **computed signal** or **effect**.

A complete example is here 👉 https://stackblitz.com/edit/stackblitz-starters-yj8qak?file=src%2Fmain.ts

---

I hope you found it helpful. Thanks for reading. 🙏

Let's get connected! You can find me on:
- **Medium:** https://medium.com/@nhannguyendevjs/
- **Dev**: https://dev.to/nhannguyendevjs/
- **Hashnode**: https://nhannguyen.hashnode.dev/
- **Linkedin:** https://www.linkedin.com/in/nhannguyendevjs/
- **X (formerly Twitter)**: https://twitter.com/nhannguyendevjs/
- **Buy Me a Coffee:** https://www.buymeacoffee.com/nhannguyendevjs
Desktop App with multiple LLM chat site at same place
Tags: chatgpt, rust, gemini, desktopapp
Published: 2024-04-19 03:05:54


I recently dived into Rust programming and crafted a desktop application. It's designed for comparing and testing the leading LLM chat sites. This tool comes in handy if you're seeking diverse perspectives on a particular topic, as it provides insights from various LLMs.


{%github https://github.com/yashwanth2804/multi-llm-rust-app %}
¡Ideas de recaudación de fondos que realmente funcionan!
Published: 2024-04-19 02:54:08

¿Buscas [actividades de recaudación de fondos efectivas](https://whydonate.com/es/blog/mejores-ideas-actividades-de-recaudacion-de-fondos/)? ¿Te preguntas cómo destacar tus campañas? En la era digital actual, la recaudación de fondos ha evolucionado significativamente. Plataformas de crowdfunding como WhyDonate han revolucionado el panorama, permitiendo el apoyo global a causas sin esfuerzo. Pero ¿cuáles son las mejores actividades de recaudación de fondos más allá del ámbito digital? Involucra a tus seguidores con emocionantes subastas, aprovechando el atractivo de artículos únicos para impulsar las donaciones. Convierte artículos no deseados en fondos organizando una venta de garaje comunitaria. Une a las comunidades a través del deporte mientras recaudas fondos vitales. Comienza el día de la manera correcta con una recaudación de fondos nutritiva. Exhibe el talento local mientras apoyas tu misión. Conecta con tus seguidores a través de un evento de karaoke lleno de diversión. Da un paso adelante por el cambio con una caminata o carrera comunitaria. Destaca talentos ocultos mientras recaudas fondos. Explora la naturaleza de manera responsable mientras apoyas los esfuerzos de conservación. Adopta prácticas ecológicas mientras recaudas fondos organizando eventos de reciclaje. Desde desfiles de moda hasta ventas de pasteles, las posibilidades son infinitas. Acepta la creatividad, involucra a tu comunidad y observa cómo florecen tus esfuerzos de recaudación de fondos. Con WhyDonate e ideas innovadoras en tu arsenal, tu próxima campaña seguramente tendrá un impacto significativo.

Referencia: https://whydonate.com/es/blog/mejores-ideas-actividades-de-recaudacion-de-fondos/
"Bybit Referral Code in 2024: BCSBONUS (Claim Bybit Sign Up Bonus Free) "
Published: 2024-04-19 02:54:03

BCSBONUS is Bybit referralcode. New Bybit users can use the promocode to receive the best Bybit referral bonus and unlimited discounts. Use the code BCSBONUS when registering to receive a $3,230 reward +$500 bonus in USDT and 15% off fees at Bybit.
58. Length of Last Word
Tags: leetcode
Published: 2024-04-19 02:54:02

https://leetcode.com/problems/length-of-last-word/?envType=daily-question&envId=2024-04-01

```javscript
/**
 * @param {string} s
 * @return {number}
 */
var lengthOfLastWord = function(s) {
   const words =  s.trim().split(' ')

   return words[words.length - 1].length
};

```
srexpress international courier service
Published: 2024-04-19 02:51:53

Worldwide Import-Documents:
_[https://srexpress.co.in/](URL)_Time-sensitive international shipping needs
- Proactive delivery notification is available on request
- The service is available for pick-up and delivery from all locations worldwide. ide
- Free pick-up and delivery
#courier #delivery #shipping #package #logistics #transportation #worldwide #international #domestic #express #economy #tracking #trackingnumber #deliverystatus #customerservice #support #claims #reimbursement
Reliable International is a trusted choice for international courier services, offering fast, secure, and cost-effective shipping solutions to customers worldwide.
✅ Searching For International Courier Services
✅ Online Booking and 17 Stores in Delhi & NCR Bangalore Mumbai Pune Hyderabad Jaipur Jalandhar
✅ Big Festival Discount on Big Brand DHL, FedEx, UPS & Aramex
✅Hassle Free International Shipping
✅Real-Time Tracking
✅Super Fast Delivery Worldwide
✅ DHL FedEx UPS TNT Online Booking
✅Free Home Pickup & Door Delivery
✅ Free Packaging and Documentation
✅Branded / Home Made Food & Medicine Courier World Wide
✅ Commercial Shipping with Free Documentation
#ParcelServices #ReliableInternational #internationalcourierservices #DomesticServices #ReliableCourierServices #DomesticParcel #InternationalParcel #couriercompany
Git 프로젝트 업로드
Tags: github, git
Published: 2024-04-19 02:40:54

```
//처음 프로젝트 올릴 때만
git init

//깃허브에서 레퍼지토리를 만든다
git remote add origin [원격저장소 주소]

//깃 브렌치 확인
git branch

//깃 브렌치 생성과 체크아웃
git checkout -b dev
```

```
//파일 업로드
git pull origin [브랜치 이름]

//전부 올리기
git add .

git commit -m "commit message"
git push origin [브랜치 이름]
```

_참조 : https://shortcuts.tistory.com/8
https://mylko72.gitbooks.io/git/content/branch/checkout.html_
What is Software Testing ?
Published: 2024-04-19 02:38:23

Software testing can be stated as the process of verifying and validating whether a software or application is bug-free, meets the technical requirements as guided by its design and development, and meets the user requirements effectively and efficiently by handling all the exceptional and boundary cases. 
            OR
Software Testing is a method to assess the functionality of the software program. The process checks whether the actual software matches the expected requirements and ensures the software is bug-free. The purpose of software testing is to identify the errors, faults, or missing requirements in contrast to actual requirements. It mainly aims at measuring the specification, functionality, and performance of a software program or application.
Absolute beginning..again
Published: 2024-04-19 02:20:54

So i am having insanely huge issues with doxxing which nO oNE took me seriously until finally NINTENDO looked into it and confirmed that yes i had discovered a huge security breach,which also around the time of the ATT supposed breach...anyway I am positively paralyzed by what the best resource is, frustrated why i dont know the command line/bash by heart, and I am ADHD possibly aspbergers and I want to ultimately go into DevSecOps or security engineering. I am thinking a bootcamp is probably my best shot as it will provide accountability to make sure i am doing something productive for me and my future than just sitting and staring at all the hate on YouTube and Reddit (which was my favorite unitl all the crap going down. Anyway if anyone has any advice or wants to chat or is going thhrough the same thing let me kn0ow. oh i am 37 yr old female and i have a few screens of powershell code that i have no idea where it came from or what its there to do. 
Thanks,
Hillary
AI: A Massive Shift in How We'll Work in the Future is Coming. Are You Ready?
Tags: machinelearning, ai, llm, datascience
Published: 2024-04-19 02:08:48

Our Relationship with Work is About to Change, Pay Attention !

[Full Article](https://medium.com/@learn-simplified/ai-a-massive-shift-in-how-well-work-in-future-is-coming-are-you-ready-a25a9057f76a)

• For hundreds of thousands of years, the ability to learn was unique to biological beings
For a very long time, learning and evolving rapidly was a trait unique to biological entities like humans. However, AI and machine learning are now allowing non-biological systems to also learn and evolve at an incredible pace.

• Work has always been central to human lives
Work has always been a fundamental part of human society and lives - providing meaning, income, and shaping civilization as we know it. Historically, there were farmers, factory workers, office workers using computers, etc.

• But History is about to change in a big way
The rise of increasingly capable AI systems is poised to drastically change the nature of work as we know it. AI can now write, code, and handle many tasks humans previously did. This is just the start of a much bigger transformation on the horizon.

• The Future Worker Will Need to Coexist with AI
In this new era, workers cannot operate alone - they must coexist and collaborate with AI tools. Employees need to adapt to leveraging AI as a partner, learning how to manage and direct it rather than doing all tasks themselves.

• How Future Organizations Will Look Like
Future organizations will have small, tightly integrated human-AI teams rather than large siloed departments. The focus will be on how these hybrid teams can achieve outsize impact by unlocking new capabilities through the combination of human and machine strengths.

• What Will Be the Most Important Skill of the Future?
The most crucial future skill won't be any specialized task, but rather the ability to orchestrate teams of human workers and AI agents/bots. This includes defining goals, planning workflows, assembling the right human-AI workforce, and managing that integrated team.

• So, How Should We Prepare for the Future?
Preparing for this future requires developing an "orchestrator" mindset - being able to flexibly combine human knowledge/experience with AI tools for each unique project's needs. Workers must learn how to assess AI capabilities, secure human roles, direct the hybrid workforce, and optimize for efficiency.
AWS Devops Engineer
Tags: devops, aws, jenkins
Published: 2024-04-19 02:06:51

hi 👋

Guyz one thing that really hurts that I am also ready to work #opentowork

I connected with many HR and messaged them but no reply

second I posted many times that anyone has any opportunity to just help but No one gives suggestions that bro you can fill this or that.. but if any girl post some thing that she wants a job and open to work all comments on that and give suggestions to her that really hurts guyz help all

Guyz if you don't give suggestion or help in job just like the post because of it post reach will increase and increase the chances for job 🙏

#helptoall