Skip to content

Instantly share code, notes, and snippets.

View hoholee12's full-sized avatar

hoholee12 hoholee12

  • Sungkyunkwan University
View GitHub Profile
# bashrc shortcut
alias clear="echo -e \"\\x1b[2J\""
alias bashrc="nano ~/.bashrc"
# vcxsrv
export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0
export LIBGL_ALWAYS_INDIRECT=1
# github shortcut
src= # your documents directory where you keep your github folder

What you need to do to install SDL is:

#install sdl2
sudo apt install libsdl2-dev libsdl2-2.0-0 -y;

#install sdl image
sudo apt install libjpeg-dev libwebp-dev libtiff5-dev libsdl2-image-dev libsdl2-image-2.0-0 -y;

#install sdl mixer
import spark.implicits._
import org.apache.spark.sql.types._
val logDF = spark.read.textFile("/sparkdata/logcat/test.txt").map(
_.replace('-', ' ').replace(':', ' ').trim.split("\\s+", 10)).map{
case Array(mm, dd, hr, mn, sc, pid, tid, priority, tag, message) =>
(mm, dd, hr, mn, sc, pid, tid, priority, tag, message)
}.toDF(
"mm", "dd", "hr", "mn", "sc", "pid", "tid", "priority", "tag", "message")
@hoholee12
hoholee12 / quicksort.c
Created April 18, 2020 03:16
quicksort
#define swap(x,y) { x = x + y; y = x - y; x = x - y; }
#define arrsize 12
#define arrcontent { 8, 3, 11, 9, 12, 2, 6, 15, 18, 10, 7, 14}
#include<stdio.h>
void quicksort(int* A, int left, int right){
for (int i = 0; i < arrsize; i++) printf("%d ", A[i]);
printf("\n");
int pivot = left;