sudo as root X11 connection rejected because of wrong authentication

I received this problem recently when I logged into root on a machine. X11 connection rejected because of wrong authentication How did this problem happen? Here’s what I did. ssh -X huyle@host sudo su xclock X11 connection rejected because of wrong authentication If I open xclock as a user, then X11 works...

More

How to Get a User’s Email Address on Github

There are a lot of people (software engineers,  open source compatriots, coding warriors) who contribute to programming projects on Github. You may be interested in a certain someone on Github, and you need to contact them! Recruiters? Potential partners? This is the surest way to find someone’s email through Github!...

More

Largest Prime Factor

Project Euler is a website with a series of math problems that can be solved with programming. Problem 3 is about finding the largest prime factor of a number. Although my first impression is that the problem looks simple since I can iterate through the possibilities one by one and...

More

How to Fix ^M Characters in Vim

I opened a CSV file in Microsoft Excel. I approved compatibility with macros on a Mac. Then, I opened the same CSV file with vim. The entire CSV file was reduced to a single line whenever I opened the file with vim. Something like this: Number of Sloths,Type^M15,black^M10,brown^M5,blue If we...

More

How to install Pip as a User

I don’t have root access on this Macintosh that I’m using. How am I supposed to get the pip package manager for Python? Python comes installed on every Macintosh. python –version Python 2.7.10 Step 1) Get easy_install easy_install is a Python utility for installing certain Python related packages. You might already...

More

C++ Libraries: Linking and Compiling

What is the -I, the -L, and the –(little L)? Why am I getting so many errors? What’s going on underneath? C and C++ libraries can be thought of as a conglomeration of functions and new keywords that you are able to use in your code. To truly understand what...

More

Google Testing: Example and CMake Integration

The Google testing environment is frequently used in software engineering projects as a means of ensuring the functionality of your code. It is a framework that highlights the fundamentals of the iterative development work flow with the ability to confirm a set of tests as you are developing, thereby increasing...

More

Graph500 on CUDA

I recently went to ISC16 for their Student Cluster Competition, and one of the challenges was to create our “own implementation of Graph500 to run on a cluster.” If you don’t know about the Student Cluster Competition, they are cluster competitions where student teams work with vendors to create a...

More

How to compile HPL (LINPACK)

This guide will show you how to compile HPL (Linpack) and provide some tips for selecting the best input values for hpl.dat based on my experiences at the student cluster competitions. This benchmark stresses the computers floating point operation capabilities. Although just calculating FLOPs is not reflective of applications typically...

More