SQLite Interface Class for R
I wrote an interface class to help with working with the SQLite database.
Methods include, selectQuery, updateQuery, readTable, writeTable
see code below
I wrote an interface class to help with working with the SQLite database.
Methods include, selectQuery, updateQuery, readTable, writeTable
see code below
Traverse the tree in natural order and test if each node is between the previous and the next node. Properly detect duplicate values. If a wrong sub-tree is encountered immediately stop the script and indicate the error.
See code below
Standard problem of trying to maximize the values of item with a constraint. How many items can you put in a knapsack given the value and the weight of the items.
Uses python3
goal: maximize the value of items selected from the get_optimal_value
while the items selected combined weight is less than the inputted capacity
Binary Search Problem
Function below handles a simple search for a needle in a haystack using the binary search algorithm.
The function is called recursively to check if a value is inside the array
See python code below.
“Making a square peg fit into a round hole”
There are many times when dealing with data that you need to transfigure one data set to allow for comparison purposes.
SQL has built in functions that easily allow us to transfigure data. There are some considerations when using the functions, most importantly understanding what will happen to the data set during the process.
Today I will talk about the CAST function.
Function to take a vector of length n and multiply the two largest values in the vector.
See the code below
When working with a large table the UPDATE statement can easily bring even the most robust server to a screeching halt. In this posting I will show an alternative so even the largest tables can be updated without negatively impacting server performance.
“What you don’t know can’t hurt you can drive you bonkers.” – R. Hedgins
Today’s posting will deal with an option setting that can minimize interoperability issues between Microsoft’s nuanced interpretations of standards.
“Union of ideas begets a surprising confidence” – J. Madison
Today’s post will deal with an SQL command many of us may be familiar with but may forget exists, or haven’t thought about other uses for it.
In simplest terms the UNION command allows you to join separate SQL queries into one result set. The UNION command has one optional option “ALL”
Powered by WordPress & Theme by Anders Norén