Many times you need to create an HTML element and dynamically add that into DOM without reloading the page. The traditional way of doing this is by using JavaScript's innerHtml() function but jQuery provides better ways to achieve the same effect. You can use jQuery DOM manipulation methods like append(), appendTo() or html() to add new HTML elements like div, paragraph, headings, image into DOM without reloading the page again. In this tutorial, I will show you how to dynamically create a div and add that into a page by using pure jQuery.
Disclosure: This article may contain affiliate links. When you purchase, we may earn a small commission.
How to Sort an HashMap by values in Java 8 - Example Tutorial
In the last article, I have shown you how to sort a Map in Java 8 by keys, and today, I'll teach you how to sort a Map by values using Java 8 features e.g. lambda expression, method reference, streams, and new methods added into the java.util.Comparator and Map.Entry classes. In order to sort any Map, like HashMap, Hashtable, LinkedHashMap, TreemMap, or even ConcurrentHashMap, you can first get a set of entries by using the entrySet() method and then you can get the stream by calling the stream() method. The entrySet() method returns a Set which inherit the stream() method from the java.util.Collection class. Once you got the stream, you can just call the sorted() method which can sort all Map.Entry objects available in Stream using a Comparator.
Labels:
core java
,
Java 8
,
java collection tutorial
,
Stream API examples
Grokking Algorithms Review - Best Book to learn Data Structure and Algorithms in Python
Hello guys, I have read many books on data structures and algorithms like Introduction to Algorithms by Thomas H. Corman and Algorithm design manual by Steve S. Skiena, so when I come to know about this book, I thought, just another book on algorithms, but I was wrong. This is not just another book on algorithms but one of the most interesting books you will ever read on Algorithms and Data structure. It doesn't cover all the data structure and algorithms you see in Computer Science but whatever it covers, it does really well and that's what matters most for beginner programmer or Computer Science students.
Labels:
books
,
data structure and algorithm
,
python
Top 20 String Algorithm Questions from Coding Interviews
In this article, we are going to see the top 20 String based coding interview question and their solution to help programmers better prepare for interviews. The string is one of the most important data structures and available in almost every programming language like Java, C, C++, Python, Perl, and Ruby. Though there implement differ the essence remains the same like String is NULL terminated character array in C but String is an object in Java, again backed by character array. The string is also available on weekly typed languages like Python and Perl. This is why you will always find some String based coding questions on programming interviews.
Labels:
coding
,
Coding Interview Question
,
core java
,
data structure and algorithm
,
String
Top 5 Courses to Pass AWS Certified SysOps Administrator Associate Exam - SOA-C01
Hello guys, I have been talking about AWS certifications for quite some time now and in the past shared how to prepare for AWS Cloud Practitioner, AWS Developer Associate, and AWS Solution architect exam, and today I am going to talking about AWS Certified SysOps Administrator Associate exam. This is probably the hardest associate-level AWS certification and I strongly suggest you appear on this exam after getting AWS Developer and AWS solution Architect exam. Though this is not pre-requisite and if you are working as DevOps engineer, you can directly go for this certification to further boost your credentials, but doing this will improve your chances to pass this certification in very first attempt and save both your time and money. It will also help you to score high which can further boost your Resume.
Top 5 Books to Learn Concurrent Programming and Multithreading in Java - Best, Must Read
Books are essential to learning something new, and despite being in the electronic age, where books have lost some shine to the internet and blogs, I still read and recommend them to get complete and authoritative knowledge on any topic, like concurrent programming. In this article, I will share five best books to learn concurrent programming in Java. These books cover basics, starting from how to create and start a thread, parallel programming, concurrency design patterns, an advantage of concurrency and of course pitfalls, issues, and problems introduced due to multithreading. Learning concurrent programming is a difficult task, not even in Java but also in other languages like C++ or modern days JVM languages like Groovy, Scala, Closure, and JRuby.
Labels:
books
,
core java
,
Java multithreading Tutorials
,
online resources
Subscribe to:
Posts
(
Atom
)