Java – Update Statistics in SQL Server on Ubuntu No.91

How to update statistics for the table in SQL Server on Ubuntu by Java is shown in this blog. ▼1. The latency of a query execution in SQL Server We often see the latency of a query execution in SQL Server. in this case, Statistics for the table might be old. If the statistics of a table is old, the appropriate query execution plan cannot be generated when running a query. such inefficient query execution plan causes long duration time for the query. The resolution of it is to update statistics for a table. the query “update statistics” and “sp_recompile” to generate a ne query execution plan are implemented by … Continue reading “Java – Update Statistics in SQL Server on Ubuntu No.91”

Python – WordCloud in Japanese – VS Code on Ubuntu No.90

How to implement Word Cloud in Japanese using python in Visual Studio Code on Ubuntu is shown in this blog. ▼1. What is WordCloud? WordCloud is a visualization tool to show the valuable word using the size of a word based on the frequency. The wiki of 2022 FIFA Qatar world cup is used for the wordcloud in Japanese. 2022 FIFAワールドカップ ▼2. Prerequisites 2-1. Preparing for Python environment Python – Visual Studio Code の利用 No.34 2-2. Installing WordCloud https://pypi.org/project/wordcloud/ 2-3. Downloading Japanese Font IPAex フォント Ver.004.01 | 一般社団法人 文字情報技術促進協議会 (moji.or.jp) 2-4. Copying Japanese text from Wiki Textjpnv2.txt file is created by copying text from this Wiki. 2022 FIFAワールドカップ Wikipedia 2-5. … Continue reading “Python – WordCloud in Japanese – VS Code on Ubuntu No.90”

Java – Creating sample data for SQL Server on Ubuntu No.89

In this blog, how to create sample records for SQL Server on Ubuntu using Java is shown. ▼1. Creating sample data using Java In the past blog, these blogs are shared. they use .sql file to create data by sqlcmd. In this blog, there is the simple way to use Java without sqlcmd to create sample data. ▼2. Prerequisites 2-1. Checking Java – Generating the sample data on SQL Server No.87 to execute below. ▼3. Creating sample data for SQL Server by Java 3-1. Create an Apache Maven project 3-2. Remove the existed both App.java and AppTest.java 3-3. Start Visual Studio Code 3-4. Update pom.xml as below to run query … Continue reading “Java – Creating sample data for SQL Server on Ubuntu No.89”

Java – Calculate the compound interest No.88

How to calculate the compound interest using Java in VS code on Ubuntu is shown in this blog. ▼1. Calculate the compound interest Rob advisor “WealthNavi” and accumulation NISA and private government bounds etc are executed by myself. the compound interest is implemented in these investments. Compound interest is increased by adding interest for the principal and adding interest for the principal + interest next year. the asset will be steadily increased using this process for a long term. Compound interest Wiki In this blog, how to calculate the compound interest by Java is shown. ▼2. Prerequisites 2-1. Installing Visual Studio Code https://code.visualstudio.com/docs/setup/linux 2-2. Installing Maven Apache Kafka Word Count … Continue reading “Java – Calculate the compound interest No.88”

Java – Generating the sample data on SQL Server No.87

In this blog, How to generate the sample data on SQL Server is shown. the key point is to use sqlcmd to run queries in Java. ▼1. Generating the sample data using Java In the pas, how to generate the sample data using python was shown in this blog. Python – Creating sample data in SQL Server on Ubuntu No.62 In the past case, the file which extension is .sql was created and then run this file by sqlcmd. this blog show the way to run query without such .sql file. ▼2. Prerequisites 2-1. Installing SQL Server on Ubuntu Quickstart: Install SQL Server and create a database on Ubuntu 2-2. … Continue reading “Java – Generating the sample data on SQL Server No.87”

Java –Save records for MySQL into Azure Blob Storage No.86 

In this blog, how to save the results of select query for MySQL into Azure Blob Storage by Java. ▼1. Prerequisites 1-1. Install MySQL and create a table with some records Java – Connect to MySQL on Ubuntu and run select query No.80 # Create a table with some records mysql> CREATE DATABASE testdb; mysql> USE testdb; mysql> create table testtbl (c1 int, c2 int); mysql> insert testtbl values(1,1),(2,2),(3,3); mysql> select * from testtbl; +——+——+ | c1 | c2 | +——+——+ | 1 | 1 | | 2 | 2 | | 3 | 3 | +——+——+ 3 rows in set (0.00 sec) ▼2. Save the results of select for … Continue reading “Java –Save records for MySQL into Azure Blob Storage No.86 “

Java -Save the results of select for MySQL into a file No.85

In this blog, how to save the results of select for MySQL on Ubuntu into a file is shown. ▼1. Prerequisites 1-1. Install MySQL and create a table with some records Java – Connect to MySQL on Ubuntu and run select query No.80 # Create a table with some records mysql> CREATE DATABASE testdb; mysql> USE testdb; mysql> create table testtbl (c1 int, c2 int); mysql> insert testtbl values(1,1),(2,2),(3,3); mysql> select * from testtbl; +——+——+ | c1 | c2 | +——+——+ | 1 | 1 | | 2 | 2 | | 3 | 3 | +——+——+ 3 rows in set (0.00 sec) ▼2. Save the results of select for … Continue reading “Java -Save the results of select for MySQL into a file No.85”

PowerShell – Visual Studio Code on Ubuntu No.84

In this blog, How to run PowerShell in visual Studio code on Ubuntu is shown. ▼1. Run PowerShell in Visual Studio Code on Ubuntu We can run PowerShell on not only Windows OS but also Ubuntu 20.4 and MacOS 11 as below. PowerShell editing with Visual Studio Code ▼2. Prerequisites 2-1. Set up Ubuntu 20.04.2 LTS https://releases.ubuntu.com/20.04/ 2-2. Install Visual Studio Code https://code.visualstudio.com/docs/setup/linux 2-3. Install PowerShell Extension by the command PowerShell editing with Visual Studio Code 2-4. Install PowerShell by the command on Ubuntu 20.4 Installing PowerShell on Ubuntu ▼3. Run PowerShell in VS Code on Ubuntu 3-1. Make a directory 3-2. Create test.txt file Create text.txt by Vi command … Continue reading “PowerShell – Visual Studio Code on Ubuntu No.84”

Scala – Visual Studio Code on Ubuntu No.83

How to execute Scala application in Visual Studio Code on Ubuntu is shown in this blog. ▼1. Run Scala code in Visual Studio Code on Ubuntu Scala or PySpark application on Apache Spark cluster is generally used. how to deploy Scala application in Visual Studio Code on Ubuntu is helpful for the deployment of application on Spark cluster. ▼2. Prerequisites 2-1. Install Ubuntu 20.04.2 LTS https://releases.ubuntu.com/20.04/ 2-2. Install Visual Studio Code https://code.visualstudio.com/docs/setup/linux 2-3. Install JDK Install Java 8 openjdk x64 of zulu Set environment variables for the installed JDK Adding below at the end of ~/.bashrc (vi ~/.bashrc) export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-x64/ Checking if $JAVA_HOME is correctly updated. 2-4. Install Maven Apache … Continue reading “Scala – Visual Studio Code on Ubuntu No.83”

Java – Search YouTube using YouTube Data API on Ubuntu No.82

In this blog, how to search YouTube videos using YouTube Data API on Ubuntu is shown. Java application is executed in Visual Studio Code on Ubuntu. ▼1. How to get API Key for YouTube Data API After creating a project and enabling YouTube Data API v3 API, API key can be generated. please refer to the following documents or another blogs. ▼2. Prerequisites 2-1. Install JDK Install Java 8 openjdk x64 of zulu Set environment variables Use vi editor like “vi ~/.bashrc” and add below in ~/.bashrc export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-x64/ Check the value of $JAVA_HOME 2-2. Install Visual Studio Code https://code.visualstudio.com/docs/setup/linux 2-3. Install Maven Apache Kafka Word Count – Java No.44 “2-3. … Continue reading “Java – Search YouTube using YouTube Data API on Ubuntu No.82”