Compare two string by equals() instead == in java 💡
Use equals() because this method internally checks == plus content equality check. ☑️
[ CODE ]
[ RESULT ]
〰〰〰〰〰〰〰〰〰〰
#java
@PorgrammingTip
Use equals() because this method internally checks == plus content equality check. ☑️
[ CODE ]
public class Test {
public static void main(String[] args) {
String s1 = "string";
String s2 = "string";
String s3 = new String("string");
String s4 = s3;
String s5 = "str"+"ing";
System.out.println("s1==s2 :"+(s1==s2));
System.out.println("s1==s3 :"+(s1==s3));
System.out.println(
"s1.equals(s3) :"+s1.equals(s3)
);
System.out.println("s3==s4 :"+(s3==s4));
System.out.println(
"s3.equals(s4) :"+s3.equals(s4)
);
System.out.println("s1==s5 :"+(s1==s5));
System.out.println(
"s1.equals(s5) :"+s1.equals(s5)
);
}
}[ RESULT ]
s1==s2 :true
s1==s3 :false
s1.equals(s3) :true
s3==s4 :true
s3.equals(s4) :true
s1==s5 :true
s1.equals(s5) :true
〰〰〰〰〰〰〰〰〰〰
#java
@PorgrammingTip
Programming Entity Framework- DbContext.pdf
7.8 MB
Programming Entity Framework : DbContext 📕
Author: Julia Lerman, Rowan Miller 🖊
Publisher: O'Reilly 📚
〰〰〰〰〰〰
#Book #EF
@ProgrammingTip
Author: Julia Lerman, Rowan Miller 🖊
Publisher: O'Reilly 📚
〰〰〰〰〰〰
#Book #EF
@ProgrammingTip
Awesome Vue.js 🔰
A curated list of awesome Vue.js things 🕶
[ Website ] :
https://github.com/vuejs/awesome-vue
〰〰〰〰〰〰
#JavaScript #Vue
@ProgrammingTip
A curated list of awesome Vue.js things 🕶
[ Website ] :
https://github.com/vuejs/awesome-vue
〰〰〰〰〰〰
#JavaScript #Vue
@ProgrammingTip
Particles.js ✨
A lightweight JavaScript library for creating particles.
[ Website ] :
http://vincentgarreau.com/particles.js/
〰〰〰〰〰〰
#JavaScript #Library
@ProgrammingTip
A lightweight JavaScript library for creating particles.
[ Website ] :
http://vincentgarreau.com/particles.js/
〰〰〰〰〰〰
#JavaScript #Library
@ProgrammingTip
particles.js
particles.js - A lightweight JavaScript library for creating particles
A lightweight JavaScript library for creating particles.
No Need for Temporary Collections, Yield Might Help ✅
Normally when we need to fetch the items from a collection we might create a Temporary List to hold the retrieved items and return. 🌀
Following is the C# code using the temporary list :
➖➖➖➖➖➖➖
To avoid the usage of this temporary collection you could choose to use the yield. 🔥
It will yield the result as and when the result set is enumerated.
Below is the code using the yield keyword :
〰〰〰〰〰〰
#CSharp #Collections
@ProgrammingTip
Normally when we need to fetch the items from a collection we might create a Temporary List to hold the retrieved items and return. 🌀
Following is the C# code using the temporary list :
public List<int> GetValuesGreaterThan100
(List<int> masterCollection)
{
List<int> tempResult = new List<int>();
foreach (var value in masterCollection)
{
if (value > 100)
tempResult.Add(value);
}
return tempResult;
}
➖➖➖➖➖➖➖
To avoid the usage of this temporary collection you could choose to use the yield. 🔥
It will yield the result as and when the result set is enumerated.
Below is the code using the yield keyword :
public IEnumerable<int> GetValuesGreaterThan100(List<int> masterCollection)
{
foreach (var value in masterCollection)
{
if (value > 100)
yield return value;
}
}
〰〰〰〰〰〰
#CSharp #Collections
@ProgrammingTip
6 Simple Tips on How to Start Writing Clean Code 👾
1️⃣ Make code readable for people.
2️⃣ Use meaningful names for variables, functions and methods.
3️⃣ Let every function or method perform only one task.
4️⃣ Use comments for clarification ( if really needed )
5️⃣ Be consistent
6️⃣ Review your code regularly
〰〰〰〰〰〰
#CleanCode
@ProgrammingTip
1️⃣ Make code readable for people.
2️⃣ Use meaningful names for variables, functions and methods.
3️⃣ Let every function or method perform only one task.
4️⃣ Use comments for clarification ( if really needed )
5️⃣ Be consistent
6️⃣ Review your code regularly
〰〰〰〰〰〰
#CleanCode
@ProgrammingTip
Debug JavaScript with Chrome DevTools 🐞
This tutorial shows you how to debug one specific issue, but the general workflow you learn is helpful for debugging all types of JavaScript bugs.
[ Website ] : http://bit.do/chromedev
〰〰〰〰〰〰
#JavaScript #Debug
@ProgrammingTip
This tutorial shows you how to debug one specific issue, but the general workflow you learn is helpful for debugging all types of JavaScript bugs.
[ Website ] : http://bit.do/chromedev
〰〰〰〰〰〰
#JavaScript #Debug
@ProgrammingTip
Medium
Learn How To Debug JavaScript with Chrome DevTools
Ditch console.log debugging once and for all! Learn how to use breakpoints to debug code within the Chrome Developer Tools
MultiScroll.js 🔃
A simple plugin to create multi scrolling websites with two vertical scrolling panels.
[ Website ] : https://alvarotrigo.com/multiScroll
〰〰〰〰〰〰
#JavaScript #Library
@ProgrammingTip
A simple plugin to create multi scrolling websites with two vertical scrolling panels.
[ Website ] : https://alvarotrigo.com/multiScroll
〰〰〰〰〰〰
#JavaScript #Library
@ProgrammingTip
Dagger 2
Dagger 2 is a dependency injection (DI) framework. It's based on the javax.inject annotations standard.
[GitHub] : http://bit.ly/2gY3BND
〰〰〰〰〰〰
#Dagger #Java #Android
@ProgrammingTip
Dagger 2 is a dependency injection (DI) framework. It's based on the javax.inject annotations standard.
[GitHub] : http://bit.ly/2gY3BND
〰〰〰〰〰〰
#Dagger #Java #Android
@ProgrammingTip
Selectize.js 💎
Selectize is the hybrid of a textbox and <select> box.
It's jQuery-based and it's useful for tagging, contact lists, country selectors, and so on.
[ Website ] : http://selectize.github.io/selectize.js/
〰〰〰〰〰〰
#JavaScript #Library
@ProgrammingTip
Selectize is the hybrid of a textbox and <select> box.
It's jQuery-based and it's useful for tagging, contact lists, country selectors, and so on.
[ Website ] : http://selectize.github.io/selectize.js/
〰〰〰〰〰〰
#JavaScript #Library
@ProgrammingTip
Waypoints.js ⚡️
Waypoints is the easiest way to trigger a function when you scroll to an element.
[ Website ] : http://imakewebthings.com/waypoints/
〰〰〰〰〰〰
#JavaScript #Library
@ProgrammingTip
Waypoints is the easiest way to trigger a function when you scroll to an element.
[ Website ] : http://imakewebthings.com/waypoints/
〰〰〰〰〰〰
#JavaScript #Library
@ProgrammingTip
Select2 🔥
The jQuery replacement for select boxes.
Select2 gives you a customizable select box with support for searching, tagging, remote data sets, infinite scrolling, and many other highly used options.
[ Website ] : https://select2.org/getting-started/basic-usage
〰〰〰〰〰〰
#JavaScript #Library
@ProgrammingTip
The jQuery replacement for select boxes.
Select2 gives you a customizable select box with support for searching, tagging, remote data sets, infinite scrolling, and many other highly used options.
[ Website ] : https://select2.org/getting-started/basic-usage
〰〰〰〰〰〰
#JavaScript #Library
@ProgrammingTip
select2.org
Basic usage | Select2 - The jQuery replacement for select boxes
Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and pagination (infinite scrolling) of results.
Scrolline.js 🌀
A jQuery plugin. Create a scroll line bar indicator on the page.
[ Website ] : https://github.com/anthonyly/Scrolline.js
〰〰〰〰〰〰
#JavaScript #Library
@ProgrammingTip
A jQuery plugin. Create a scroll line bar indicator on the page.
[ Website ] : https://github.com/anthonyly/Scrolline.js
〰〰〰〰〰〰
#JavaScript #Library
@ProgrammingTip
GitHub
GitHub - anthonyly/Scrolline.js: A jQuery plugin. Create a scroll line bar indicator on the page.
A jQuery plugin. Create a scroll line bar indicator on the page. - GitHub - anthonyly/Scrolline.js: A jQuery plugin. Create a scroll line bar indicator on the page.
JUnit ☑️
JUnit is a Unit Testing framework for the Java programming language. ☕️
JUnit has been important in the development of test-driven development, and is one of a family of unit testing frameworks which is collectively known as xUnit that originated with SUnit.
https://ibb.co/f0EFR5
[Website] : http://junit.org/junit5/
〰〰〰〰〰
#java #junit
@ProgrammingTip
JUnit is a Unit Testing framework for the Java programming language. ☕️
JUnit has been important in the development of test-driven development, and is one of a family of unit testing frameworks which is collectively known as xUnit that originated with SUnit.
https://ibb.co/f0EFR5
[Website] : http://junit.org/junit5/
〰〰〰〰〰
#java #junit
@ProgrammingTip
imgbb.com
junit5 banner
Image junit5 banner hosted in imgbb.com
6 Essential VSCode Extensions for Angular Developers 💎
• TypeScript Hero
• Angular Language Service
• Bracket Pair Colorizer
• Move TS
• Material Icon Theme
• Angular TypeScript Snippets
http://bit.do/vsico
[ Website ] : http://bit.do/vsxt
[ Src ] : @IranAspMvc
〰〰〰〰〰〰
#Angular #VSCode #Extension
@ProgrammingTip
• TypeScript Hero
• Angular Language Service
• Bracket Pair Colorizer
• Move TS
• Material Icon Theme
• Angular TypeScript Snippets
http://bit.do/vsico
[ Website ] : http://bit.do/vsxt
[ Src ] : @IranAspMvc
〰〰〰〰〰〰
#Angular #VSCode #Extension
@ProgrammingTip
Express ✨
A minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.
https://expressjs.com
〰〰〰〰〰〰
#Nodejs
@ProgrammingTip
A minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.
https://expressjs.com
〰〰〰〰〰〰
#Nodejs
@ProgrammingTip
Access Modifiers 🤷🏻♂️🚫
Public 🌎
Using Public, an event or a variable can be accessed from outside of the class, where it belongs.
And also from the outside of the assembly.
〰〰〰〰
Private 🔒
It restricts the use of methods and variables only within the class itself.
It can't be used from outside of the class.
As you declare a private constructor of a class, that class can't be accessed from outside that class, you can't create an object of that class.
〰〰〰〰
Protected ⛓
This allows variables and methods to access from that class and the sub class of the class.
That means that methods can be accessed within that class and from the classes, which actually inherit that class.
〰〰〰〰
https://t.me/pgimg/4
#Access_Modifiers
@ProgrammingTip
Public 🌎
Using Public, an event or a variable can be accessed from outside of the class, where it belongs.
And also from the outside of the assembly.
〰〰〰〰
Private 🔒
It restricts the use of methods and variables only within the class itself.
It can't be used from outside of the class.
As you declare a private constructor of a class, that class can't be accessed from outside that class, you can't create an object of that class.
〰〰〰〰
Protected ⛓
This allows variables and methods to access from that class and the sub class of the class.
That means that methods can be accessed within that class and from the classes, which actually inherit that class.
〰〰〰〰
https://t.me/pgimg/4
#Access_Modifiers
@ProgrammingTip
Telegram
Programming Tips Resources