The purpose of this post is to provide additional information regarding an issue that I am experiencing with an application written in C / C++ that can also run as a service. This is legacy code and has been operating for almost two decades. The software can be invoked to run interactively or as a service. The code just stopped to work when invokes as a service about two months ago. I tried to replicate it on my development system and on a new computer system. The issue is that the software runs when invoked as an application but fails to start when started as a service. Continue reading “ODBC SQLDriverConnect Crashes – Additional Info”
Let’s define the requirements for this algorithm. We are given two sets of integers. The idea is to check if the sets are permutations of each other. If they are, return YES; otherwise return NO.
First let’s make sure we agree with the definition of permutation. For the sets to be permutations we must have the same number of elements in both sets. Each set must have the same counts for each entry. For example if the sets are:
1 2 3 4 5 6
6 5 4 3 2 1
Then we would return YES. Both sets have the same length (six in this case) the numbers are the same on both sets, and the count of each number matches (one in this case).
7 6 5 0 9 7
7 6 1 0 9 7
Given that 5 is in the first set, but not in the second and 1 is in the second, but not in the first, these are not permutations of each other so we would return NO. Continue reading “Is Permutation”
In this post we will develop a couple methods to collect some information from a binary tree. The first method will be the base, and the second will be an enhancement of the first.
The first requirement is: given a binary tree with double values, compute the sum of all nodes in the tree.
The second requirement is: given a binary tree with double values, compute the sum of all nodes whose values are in a specified range (e.g., [ 10.0 : 15.0 ]). Continue reading “Binary Tree Sum”
I have an issue for which I have already posted a question “ODBC SQLDriverConnect crashes when running as a service” in Stack Overflow. I am generating this post to provide additional information and will add a link to it in Stack Overflow.
The software in question was written in C. It is a 32-bit application. When it starts it performs some checks and opens SQL Server database. The software support most (never say all) versions of SQL Server.
The base software has been running on different versions of Windows. The original software was designed about 20 years ago.
I am using a Windows 10 machine. The problem seems to happen in other versions of Windows (e.g., Windows Server 2016 Standard). Continue reading “ODBC SQLDriverConnect Crashes Service”
A few minutes ago my wife called me up to the kitchen to help her. She needed Grand Maniere for an Italian nonna’s apple cake she was making. In addition to the apples, she likes to add raisins soaked in liquor. She decided to use Grand Maniere because she found a large bottle in the liquor cabinet. She could not remove the cork so she called me for help. As I was attempting to open the bottle I asked if she remembered when we got it. It seems that we bought the bottle when we lived in Maryland; that was many years ago.
The cork disintegrated when I was opening the bottle. The bottle was standing up and with the years the cork dried up. We keep our wines in an angle in our cellar, but the hard liquor in our cabinet is standing right side up. We seldom consume hard liquor. The Grand Maniere smelled fine and my wife was able to soak the raisins. Each time she fixes this dessert she tries to make it a little different. In my opinion, apples, raisins and walnuts go very well together. Will let you know in my next post how this cake turned out. Continue reading “Java Streams”
Today I decided to solve a HackerRank problem. Randomly I selected The Full Counting Sort. If interested read the requirements. I read the requirements and decided to give it a try.
Based on my experience with this problem you might want to follow my advice. Work on the algorithm and make sure it passes the two sample test cases. Once you are done, submit your solution. If you have a valid approach then chances are that your solution will fail test #5, it will time out. I generated up to three different versions of the countSort() function. I could not get past test #5 because it would time out. I spent time reading the discussions and they did not make much sense. I even bought test #5 for some hackos. By the way, the test includes 1,000,000 strings which I could not download no matter how many times I tried. With this problem do not purchase test #5. You will not be able to run it. Continue reading “The Full Counting Sort”
I received a notification via email that Nicholas White had put a new video in YouTube. If you are interested, the video is named Google Coding Interview Question – Sum of Two. I enjoy working on problems. Try to get a few each week.
Let’s skip the chit chat and go directly to this problem. The statement for the problem follows:
You have two integer arrays a and b, and an integer target value v.
Determine whether there is a pair of numbers, where one number is taken from a and the other from b, that can be added together to get a sum of v.
Return true if such a pair exists, otherwise return false. Continue reading “Sum of Two”
Today is Saturday February 15, 2020 and the temperature is about 35 F which is a great improvement from yesterday. We woke up at -15 F which was exactly 50 degrees cooler. I am on the second block for the day. My wife and I already had our tea with lemon and she is getting in the shower. She will let me know when ready so I can shutdown my computer and start working on lunch. Hopefully I will be able to complete this post today; otherwise it will be ready tomorrow morning. Continue reading “GitHub, Git and VSCode”
This morning in the Twin Cities of Minneapolis and St. Paul we woke up with a temperature of -11 F. The central heating unit worked overtime last night. It was quite dry indoors. Not sure why this happens due to the fact that the central heating as a built in humidifier and air exchange sub systems.
Yesterday morning I read the article “Do You Solve Programming Problems or Complete Exercises? (The Difference Matters.)” by Amy Haddad. She makes a difference between problem-solving and solving exercises. I agree with her interpretation. If interested read her article and possibly comment in her or my post.
I tend to write about programming challenges, books that I have read, database engines, etc. Most of the posts deal with a single subject. On occasions I extend a particular topic to several posts. I have mentioned that I would like to do a few posts on developing projects that fall outside work. This post will start a set of post which will be associated with developing different components that will allow a user to collect a set of specific images, pre process them, train machine learning (ML) algorithms, test them and deploy the best algorithm. We can then compare the results versus what a human (me in this case), and a feature that I developed for a project at work that produces the same result but using a different approach. Continue reading “Rotation Angle Project”