Warning: Declaration of mosaic_walker_nav_menu_dropdown::start_lvl(&$output, $depth) should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in /home/linkevin/public_html/wp-content/themes/mosaic/functions.php on line 537

Warning: Declaration of mosaic_walker_nav_menu_dropdown::end_lvl(&$output, $depth) should be compatible with Walker_Nav_Menu::end_lvl(&$output, $depth = 0, $args = Array) in /home/linkevin/public_html/wp-content/themes/mosaic/functions.php on line 537

Warning: Declaration of mosaic_walker_nav_menu_dropdown::end_el(&$output, $item, $depth) should be compatible with Walker_Nav_Menu::end_el(&$output, $item, $depth = 0, $args = Array) in /home/linkevin/public_html/wp-content/themes/mosaic/functions.php on line 537

Warning: Parameter 2 to wp_hide_post_Public::query_posts_join() expected to be a reference, value given in /home/linkevin/public_html/wp-includes/class-wp-hook.php on line 286Programming Archives - The Notepad Blog

Category Archives: Programming

This weekend I decided to set up my own desktop to run CUDA programs for my GPU programming class. It probably wasn’t the best idea, since I had to force reboot my computer a few times for crashing my GeForce device driver. Oh well. The approach I followed was from the Nvidia Getting Started Guide for Microsoft Windows. It’s pretty concise, so it’s definitely a good read if time allows. How to Setup CUDA in Windows 10: For this approach, you will need: A CUDA-enabled GPU Nvidia CUDA toolkit Visual Studio 2013 At the time of this writing (Nov 2015), Visual Studio 2014 and 2015 are not yet supported for CUDA programming. I believe …

There are multiple ways to replace spaces in a string with “%20”, but one way I did it without starting from the back is through string concatenations and substrings (substr). In C++: Output: Substr takes in two inputs and returns a string that starts from position index and spans for length characters. In our above example, str.substr(0, i) when i = 5 ([5] == ‘ ‘) will return “hello” (starting from position 0 and spanning 5 chars). My reasoning in this example was that I would take substrings of everything before and after the space, and then concatenate them together with a “%20” in between. Corner cases weren’t checked, but it works well in normal cases. …

In my Data Structures and Algorithms II class (more like Algorithms and Algorithms class), our professor assigned us to write a RSA encryption program to complement our coursework on modular arithmetic and primality testing. Because we needed large numbers (1024 bits) which would absolutely not fit inside normal primitive data types, we were suggested to use the GMP library for C++, or BigInteger for Java. Being a C++ guy, I choose GMP. Now, what I found out while writing this lab was that installing GMP was actually harder than writing the program! To cut to the chase, here is how to download and install GMP onto your Ubuntu system. This …

A few days ago I was writing a program that required the use of new syntax from a newer standard of C++. I looked around trying to figure out where to tick a setting or add a line somewhere on Eclipse, but just couldn’t find where to do so! Now, I knew how to compile under the new standards on the Linux command line, but with the way my project was designed, being able to compile under Eclipse would be wayy more convenient. In this page, I will be going over how to compile C++11 under both the terminal and Eclipse. Compiling under Ubuntu Terminal Starting from the command line …

Meet Kevin

I work as a software engineer for Qualtrics in Seattle. I love technology, and that's why I decided to start this blog during college to share my troubles and successes with the folks of the Internet. Outside of work, I love to play and watch soccer. Occasionally, I also enjoy playing DotA 2 and FIFA online with my friends.