echo "import java.net.InetAddress; \
public class HostnameFromIp { \
public static void main(String[] args) throws Exception { \
var startTime = System.currentTimeMillis(); \
System.out.println(InetAddress.getByName(args[0]).getHostName() + \
\" - \" + (System.currentTimeMillis() - startTime) + \"ms\"); \
} \
}" > HostnameFromIp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Create user xxx_dba | |
create user xxx_dba with encrypted password 'Dba12345'; | |
--Create app user | |
create user xxx_user with encrypted password 'User12345'; | |
--Create xxx database (db owner = xxx_dba) | |
create database xxx with owner xxx_dba; | |
--Change db to xxx without change user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Usage: export JAVA_TOOL_OPTIONS=`get-java-opts-proxy` | |
local_http_proxy=${HTTP_PROXY:-$http_proxy} | |
if [ -n "$local_http_proxy" ] ; then | |
if [ $? -eq 0 ]; then # If variable has username and password, its parse method different | |
http_proxy_host=$(echo $local_http_proxy | sed 's/http:\/\/.*@\(.*\):.*/\1/') | |
http_proxy_port=$(echo $local_http_proxy | sed 's/http:\/\/.*@.*:\(.*\)/\1/' | tr -d "/") |
Executing stored procedures in Spring Boot using the @Procedure
annotation provides a convenient way to interact with database procedures. By annotating a method with @Procedure
and specifying the procedure name, you can easily call stored procedures, pass parameters, and handle result sets, simplifying the integration of stored procedures in your Spring Boot application.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.cipher; | |
import java.nio.charset.StandardCharsets; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.security.InvalidAlgorithmParameterException; | |
import java.security.InvalidKeyException; | |
import java.security.Key; | |
import java.security.KeyStore; |
NewerOlder