Today we learn about redis Hash, What is it, Command of hash, Redis hashes is map or dictionaries data structure. Each hash in Redis is associated with a key, and the key can be used to access the value, add value, modify value or remove fields.
in short the Hashes in redis:
Key with named […]
Redis, renowned for its blazing-fast performance and versatile data structures, offers a myriad of tools for developers to architect robust and scalable applications. At the heart of Redis lies its string data type, a foundational element empowering developers to craft efficient and dynamic solutions.
Unleashing Versatility: Redis strings transcend mere text storage, serving as dynamic […]
Redis can automatically clean data from memory using keyword. we can tell Redis to remove data at seconds, milisecond and epoch time.
List Command to Key Expirations
TTL key : this comand return integer (seconds) expiration, -1 means key without TTL. exp: TTL totalemployee 19835 second= 5.50972222 hour IF we need to show expiry in […]
SET key value [NX | XX] GET [ EX | PX | EXAT | PXAT | KEEPTTL]
Let’s break down the options for the set commands in redis SET for save data key : key of value value : value of data optional keywords of SET (update, insert or update) NX : only set the […]
spring-boot-redis-jedis
Learning Spring boot using JEDIS
Prerequisites
Install Redis Stack Install Redis using Docker Script Install redis-stack on docker docker run -d –name redis-stack -p 6379:6379 -p 8001:8001 -e REDIS_ARGS=”–requirepass root” -v /path/your/local/machine:/data redis/redis-stack:latest
pom.xml
<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis-reactive</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.projectreactor</groupId> […]
A locator is a way to identify elements on a page. It is the argument passed to the Finding element methods.
Type Locator Selenium
LocatorDescriptionBy.id(“IdHtml”)Locates elements whose ID attribute matches the search valueBy.name(“NameAtributeHtml”)Locates elements whose NAME attribute matches the search valueBy.xpath(“Path”)Locates elements matching an XPath expressionBy.className(“className”)Locates elements whose class name contains the search value (compound class names […]
Learn Selenium
Download Browser ( in my case, download chrome) Download Web Driver browser Chrome (note: make sure version driver same with browser) Let’s Code
pom.xml
<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>4.15.0</version> </dependency>
App.java
package com.putracode; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import java.util.logging.Level; import java.util.logging.Logger; /** * Hello world! * */ public class App { public static […]
Images vs Container An Images Is The Application We wan To Run A Container is an instance of that image running as a Process Running Nginx on Docker Running nginx on foreground
docker container run –publish 80:80 nginx
Docker engine will look image nginx, and pull from docker hub . Then started a new container […]
Tuple data type is a fixed-length sets of typed positional fields. Use a tuple as an alternative to user-defined type(UDT). A Tuple can accommodate many fields(32768). When we create a table, for tuple datatype use angle brackets and a comma delimeter for the commponent types. Unlike other “composed” types (collections and UDT), a tuple is […]
In previous section we learn creating user, keyspaces and managed table. Now we will learning how to insert, update, and deleting data in cassandra using cassandra.Operation DML ( Data Manipulation Language) similar to RDMS (Relational Database Management System). Using Keyword INSERT INTO for inserting data, keyword UPDATE table_name SET columns WHERE conditional for updating data, […]