Generics mean parameterized types. The idea is to allow type (Integer, String, … etc, and user-defined types) to be a parameter to methods, classes, and interfaces. Using Generics, it is possible to create classes that work with different data types. For example: // A Simple Java program to show working of user defined // Generic …
How to deploy your first smart contract on Ethereum
1. Use Remix First we naviagete to the Remix. And then we can create a new workspace and add a new file from left part interface. 2. Edit the file we added. I will use the code below as a simple demo. // SPDX-License-Identifier: MIT pragma solidity >=0.5.17; // We define a contract with the …
Continue reading “How to deploy your first smart contract on Ethereum”
How to launch your own ICO in Ethereum?
1.First install and register your wallet. For example, I use MetaMask. 2. Send test ETH to our wallet. We don’t need to use our real ETH, so don’t worry. Just copy your wallet address to this link. You can get 1 ETH each 24 hours. 3. Token Code. Ethereum tokens comply with ERC-20, you can …
Use youtube-dl to download 1080P video with audio
Today I used youtube-tl to download videos from YouTube. Because of networking traffic it took me some time to finish, however, video downloaded successfully. But when I open the video then I notice the audio file not be downloaded simultaneously. Here is a way to fix this problem: youtube-dl -f 137+bestaudio –merge-output-format mkv youtube_url
How to build VPN using Shadowsocks
Purchase a VPS in CentOS. SSH to your VPS. Download and deploy Shadowsocks into your VPS. wget –no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocksR.sh chmod +x shadowsocksR.sh ./shadowsocksR.sh 2>&1 | tee shadowsocksR.log Follow the promotions and set basic informaiton. If meet errors, install C compilor: yum -y install gcc automake autoconf libtool make yum -y install gcc-c++ some commands start:/etc/init.d/shadowsocks …
How to fix “Caused by: java.lang.NoClassDefFoundErr”
Use code below to compile and run our program: javac -d . Caller.java java com.Caller
How to install JavaFX on Mac
The simplest way I have seen is to use brew: brew tap bell-sw/liberica brew install –cask liberica-jdk15-full Then we could use terminal at least to run our JavaFX program. However, I think here would be more setting steps if you wanna run it in some IDE.
Java Development Configuration in VS Code MacOS
Got jdk path /usr/libexec/java_home -V Set JAVA.HOME VSCode -> Code -> Preference -> setting -> enter java.home -> setting.json
How to deploy Halo in CentOS VPS
Install Nginx in VPS Install Java sudo yum install java-11-openjdk -y // install java java -version // check version Create a new halo user useradd -m halo // new user usermod -aG wheel halo // grant permission passwd halo // set password su – halo // switch user Download halo.jar mkdir ~/app && cd ~/app …
How to deploy Nginx in CentOS
SSH to VPS ssh root@ip Update yum to install Nginx yum -y update Install Nginx yum install nginx Start Nginx and start Nginx when server launch systemctl start nginx systemctl enable nginx Check Nginx status systemctl status nginx Set firewall for visiting sudo firewall-cmd –permanent –zone=public –add-service=http sudo firewall-cmd –permanent –zone=public –add-service=https sudo firewall-cmd –reload …