Bugs in applications & pinned plans in queries

Bugs in applications & pinned plans in queries At my place of work, one of the ways non optimal plans are handled , is by gathering stats. The other method is to use SQL profiles, by ‘pinning’ plans to queries. Oracle also supports SQL baselines another method of doing a similar thing. This leads to problems as plans which work today, might not work two years down the line. (Think table stats evolution over time)....

April 5, 2024 · Tejaswi D Prakash

Scoring functions for breaking cryptopals ciphers

The problem is to find a scoring function. A function which assigns a number to the likeliness of a message to be english. What I tried for the score computing function Most of them based on ‘ETAOIN SHRDLU’ (frequency analysis) Position based weighting (higher score is better) def scorecompute(msg): score = 0 positions = 'ETAOIN SHRDLU' for i in positions: weight = len(positions) - positions.find(i) score += msg.upper().count(i) * weight return score doesn’t work so well From this point on higher scores are worse....

January 26, 2023 · Tejaswi D Prakash

Azure Work Items And Org mode

The following post is about viewing data from azure work items (ticket id, title etc..) and managing org notes by tagging them. Setting up az cli & az devops extension for az cli azure has a cli and for azure devops there is an extension . #after installing azure cli & cli devops extension #login az devops login Viewing tickets in org mode (using az wiql) This snippet does two things...

January 5, 2023 · Tejaswi D Prakash

Thoughts on Viewing Logs

log viewing What I tried Logview mode emacs Notepad++ Notepad++ supports ‘User Defined Languages’ for key word highlighting, folding etc.. Wrote a log search gui in tkinter Tried this first , until I discovered notepad++ has all of the features I added built into it. How I wanted to go about it Regular expression for the tokens and parsing for the log format Turns out you don’t need that level of configuration See 1 timestamp tz LEVEL message etc....

January 4, 2023 · Tejaswi D Prakash

Disabling SSL while using Git and pip

SSL errors If you get errors like : unable to get local issuer certificate error or Failed to connect to github.com port 443 after 21380 ms: Timed out while using git OR WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ConnectTimeoutError while using pip , It could mean you are behind a corporate proxy. Behind tools such as ZScaler. A quick fix to this (although not the safest way) is to disable ssl for Git...

July 16, 2022 · Tejaswi D Prakash

Using git with large mono repos

The following approaches can be used to work with large git repositories. Limit large files from being downloaded. using ‘filter’ So files such as large binaries, zip files won’t be downloaded. #size in MB git clone --no-checkout --filter=blob:limit=<size> your_git_repo.com Limit git to a set of directories This can be done using git ‘sparse checkout’ #inialize empty git repo mkdir your_git_dir; cd your_git_dir git init # set which sub-directory contents you want git sparse-checkout set --cone input-directory #add remote and do a pull git remote add origin my_git_repo....

June 16, 2022 · Tejaswi D Prakash

Nvarchar and Nchar oracle db

NVARCHAR and NCHAR in oracle Oracle supports multiple charactersets at the same time through its use of the NLS* paramters. select * from nls_database_parameters where parameter in ('NLS_LENGTH_SEMANTICS', 'NLS_CHARACTERSET', 'NLS_NCHAR_CHARACTERSET'); There are two things to note The value of NLS_CHARACTERSET The value of NLS_NCHAR_CHARACTERSET on my system the values are the following NLS_NCHAR_CHARACTERSET = AL16UTF16 NLS_CHARACTERSET = WE8ISO8859P1 If you haven’t already guessed from the title of this article, NVARCHAR and NCHAR are two additional data types which behave similar to VARCHAR and CHAR....

May 27, 2022 · Tejaswi D Prakash

Initializing List with an array in Java

Initializing Lists Why is this List<Integer> a = new List<Integer>({1,2,3}) not possible? Simple workaround class ListInit { public static void main(String args[]){ List<Integer> a = Arrays.asList(1,2,3); } } but, Is it not possible to initialize a List with an array literal? It is! That means Arrays.asList() should work with an array literal. But the below doesn’t work. List<Integer> a = Arrays.asList({1,2,3}); Although this does with the ’new’ keyword. List<Integer> a = Arrays....

March 18, 2022 · Tejaswi D Prakash