Category: Root

Python: MatPlotLib: Plot Data

Sample Data:

Dynamic SQL

“Dynamic SQL is the SQL statement that is constructed and executed at runtime based on input parameters passed” Example: ChatGPT DECLARE @sql AS NVARCHAR(MAX) SET @sql = ‘SELECT * FROM Employees WHERE Department = ”’ + @department + ”” EXEC sp_executesql @sql Another Example: Oracle table_name := ‘HR.Employees’; dyn_sql := ‘Select * from ‘ || …

Continue reading

What is a Dynamic Cursor in Oracle PL/SQL

Dynamic/Ref Cursor CREATE OR REPLACE PROCEDURE query_invoice( month VARCHAR2, year VARCHAR2) IS TYPE cur_typ IS REF CURSOR; c cur_typ; query_str VARCHAR2(200); inv_num NUMBER; inv_cust VARCHAR2(20); inv_amt NUMBER;BEGIN query_str := ‘SELECT num, cust, amt FROM inv_’ || month ||’_’|| year || ‘ WHERE invnum = :id’; OPEN c FOR query_str USING inv_num; LOOP FETCH c INTO …

Continue reading

Case Statement in Oracle PL/SQL

Write a SQL block that will categorize Employee Salaries. If the Salary is higher than average, it will show ‘Above Average’ to the output. If the Salary is lower than the average it will show ‘Below average’ to the output. Use HR.Employees Table. Also, utilize CASE statement.

Variable Declaration Conventions in Oracle PL/SQL

Ref: https://trivadis.github.io/plsql-and-sql-coding-guidelines/v4.1/2-naming-conventions/naming-conventions/

3D Scatter Plot in Python

Visualizing 3-D numeric data with Scatter Plots length, breadth and depth Ref: https://towardsdatascience.com/the-art-of-effective-visualization-of-multi-dimensional-data-6c7202990c57 import pandas as pdimport matplotlib.pyplot as pltfrom mpl_toolkits.mplot3d import Axes3Dimport matplotlib as mplimport numpy as npimport seaborn as sns%matplotlib inline fig = plt.figure(figsize=(8, 6))ax = fig.add_subplot(111, projection=’3d’) xs = wines[‘residual sugar’]ys = wines[‘fixed acidity’]zs = wines[‘alcohol’]ax.scatter(xs, ys, zs, s=50, alpha=0.6, edgecolors=’w’) ax.set_xlabel(‘Residual …

Continue reading

How to Disable SELinux

Ref: https://www.ibm.com/docs/en/tnpm/1.4.5?topic=tasks-disable-selinux-linux-only Sample File:

selinux: getsebool -a sample output

getsebool -a | head abrt_anon_write –> offabrt_handle_event –> offabrt_upload_watch_anon_write –> onantivirus_can_scan_system –> offantivirus_use_jit –> offauditadm_exec_content –> onauthlogin_nsswitch_use_ldap –> offauthlogin_radius –> offauthlogin_yubikey –> offawstats_purge_apache_log_files –> off

VPN (Business VPN) to connect to Corporate Network

Options: Cisco Any Connect Cisco Mobility Connect You will be able to download from: https://software.cisco.com/download/home Versions available for Windows, Mac, and Linux. Other Options: OpenConnect Global Protect NordLayer Using Anyconnect VPN on Linux: https://www.cisco.com/c/en/us/support/docs/smb/routers/cisco-rv-series-small-business-routers/kmgmt-2597-Installing-AnyConnect-Linux-Ubuntu-desktop-User-Interface.html Open Connect: https://www.infradead.org/openconnect/download.html NordLayer Business VPN: https://nordlayer.com/business-vpn “A VPN is a security solution that provides a tunnel between your organization’s resources …

Continue reading

Fix the WordPress Issue: Could not reach wordpress.org Curl Error 7

How to fix mail command does not work? yum install mailx or apt get install mailx