-
MY PROJECTS
-
Recent Posts
- SQL.How can you compare two nullable values safely, and how does IS DISTINCT FROM differ from <>?
- SQL.How are NULL values ordered by ORDER BY, how do defaults differ between databases, and how can you control their placement?
- SQL.How does NULL propagate through arithmetic expressions, and how can COALESCE and NULLIF help handle missing values and division by zero?
- SQL.How does NULL affect join conditions, and why can filtering the right-hand table in WHERE remove unmatched rows from a LEFT JOIN?
- SQL.How do GROUP BY and DISTINCT treat NULL values, even though NULL = NULL evaluates to UNKNOWN?
- SQL.How do aggregate functions handle NULL, and what is the difference between COUNT(*), COUNT(column), and COUNT(DISTINCT column)?
- SQL.How does NULL affect IN and NOT IN, and why can NOT EXISTS be a safer choice when a subquery returns nullable values?
- SQL.How do WHERE, HAVING, and CHECK constraints treat conditions that evaluate to UNKNOWN?
- SQL.Why do column = NULL and column <> NULL not work as expected, and when should you use IS NULL and IS NOT NULL?
- SQL.What is SQL’s three-valued logic (TRUE, FALSE, UNKNOWN), and how do AND, OR, and NOT behave with UNKNOWN?
- ChromeDevTools.Watch all failed requests
- SQL.What are domain types (or constraints on data types), and how do they help enforce data correctness?
- SQL.How does SQL handle comparisons between different data types (for example, string vs number), and why is this dangerous?
- SQL.What is the difference between DATE, TIME, TIMESTAMP, and TIMESTAMPTZ, and which one should be used for business events?
- SQL.How do numeric types like INTEGER, BIGINT, DECIMAL, and FLOAT differ in terms of precision and use cases?
- SQL.What problems can arise from implicit type casting in SQL, and how can it affect indexes?
- SQL.How does NULL differ from 0, an empty string, or FALSE in SQL?
- SQL.What is the difference between CHAR, VARCHAR, and TEXT, and when would you choose each?
- SQL.What is MVCC ?
- SQL.What is AutoVacuum Postgres ?
Categories
- Aptana
- Azure
- C#
- DataSnap
- DBExpress
- Delphi
- Delphi и сети
- Delphi. Язык программирования
- ExtJS
- FastReport
- FireDAC
- FireMonkey
- GIT
- ICS
- IDE
- IIS
- Indy
- InnoSetup
- javascript
- jQuery
- JSON
- LiveBindings
- MSHTML
- MySQL
- PHP
- REST
- Ribbons
- SMS
- SQL инструкции
- SVN
- TRichView
- UniGui
- WebBroker
- WinAPI
- Windows
- Алгоритмы
- Без рубрики
- Деревья
- Ищу ответ
- Компонентостроение
- Мои компоненты
- Начальный уровень
- Обработка исключений
- Парсинг
- Потоки(Threads)
- Регулярные выражения
- Тестирование приложений
Author Archives: Stanislav_Panteleev
Java.Collections.If you want to create a HashSet from the keys of a HashMap, it’s super simple — just grab the key set and pass it to the HashSet constructor.
✅ One-liner: 💡 Example: 🧠 Notes: map.keySet() returns a live view of the map’s keys. Wrapping it in a HashSet gives you a separate copy. If you only want a read-only view, you could use map.keySet() directly.
Posted in Без рубрики
Comments Off on Java.Collections.If you want to create a HashSet from the keys of a HashMap, it’s super simple — just grab the key set and pass it to the HashSet constructor.
Java.Collections.How to convert an ArrayList to a HashSet in one line?
✅ To convert an ArrayList to a HashSet in one line, just use the HashSet constructor: 💡 Example: 🧠 Notes: ✅ Duplicates are removed automatically. ❌ Order is not preserved (because HashSet is unordered). If you want to preserve insertion … Continue reading
Posted in Без рубрики
Comments Off on Java.Collections.How to convert an ArrayList to a HashSet in one line?
Java.Collections.How to convert a HashSet to an ArrayList in one line?
✅ One-liner: 💡 Example: 🧠 Notes: This copies all elements from the HashSet to a new ArrayList. The order is not preserved, because HashSet doesn’t maintain insertion order. If you want to preserve insertion order, and you’re starting with a … Continue reading
Posted in Без рубрики
Comments Off on Java.Collections.How to convert a HashSet to an ArrayList in one line?
Java.Collections.How to get a List with all elements except the first and last 3 in one call from List?
✅ One-liner using subList: 🔍 Explanation: list.subList(fromIndex, toIndex) returns a view of the list from fromIndex (inclusive) to toIndex (exclusive). So: 3 skips the first 3 elements, list.size() – 3 excludes the last 3 elements.
Posted in Без рубрики
Comments Off on Java.Collections.How to get a List with all elements except the first and last 3 in one call from List?
Java.Collections.How to copy elements of any collection to an array in one line?
✅ If you want to copy elements from any collection to an array in just one line, here’s how you do it in Java:
Posted in Без рубрики
Comments Off on Java.Collections.How to copy elements of any collection to an array in one line?
Java.Collections.How to make a cache with “invalidation policy” using LinkedHashMap?
✅ Why LinkedHashMap? LinkedHashMap maintains a linked list of entries: Either in insertion order or Access order (when enabled) — which is perfect for caching. It also provides a protected method: You can override this to define your invalidation policy … Continue reading
Posted in Без рубрики
Comments Off on Java.Collections.How to make a cache with “invalidation policy” using LinkedHashMap?
Java.Collections.Implement a symmetric difference of two collections using Collection methods (addAll(…), removeAll(…), retainAll(…)).
🔄 Let’s implement the symmetric difference of two collections in Java using only standard Collection methods like addAll(), removeAll(), and retainAll() — no custom loops, no streams, just pure Java Collections API.
Posted in Без рубрики
Comments Off on Java.Collections.Implement a symmetric difference of two collections using Collection methods (addAll(…), removeAll(…), retainAll(…)).
Java.Collections.Give an example of a collection throwing an UnsupportedOperationException.
✅ When does UnsupportedOperationException happen? It’s thrown when you try to perform a modification operation (like add(), remove(), or clear()) on a collection that doesn’t support it.
Posted in Без рубрики
Comments Off on Java.Collections.Give an example of a collection throwing an UnsupportedOperationException.
Java.Collections.Write a single-threaded program that causes a collection to throw a ConcurrentModificationException.
💣 Here’s a minimal and crystal-clear single-threaded Java program that throws a ConcurrentModificationException by modifying a collection during iteration — a classic trap!
Posted in Без рубрики
Comments Off on Java.Collections.Write a single-threaded program that causes a collection to throw a ConcurrentModificationException.
Java.Collections.How can you get a read-only collection?
✅ Use Collections.unmodifiableXxx() methods Java’s Collections class provides static factory methods to wrap a collection and prevent modifications:
Posted in Без рубрики
Comments Off on Java.Collections.How can you get a read-only collection?