This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A class whose {@code main(String[])} method | |
* prints {@code hello, world\n} to {@code System.out}. | |
* | |
* @author Jin Kwon <jinahya_at_gmail.com> | |
*/ | |
public class HelloWorld { | |
/** | |
* Prints "hello, world\n" to {@code System.out}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static com.github.jinahya.logback.core.LogRecorderReflector; | |
import org.slf4j.Logger; | |
public class LogRecoderExample { | |
public static void main(final String[] args) | |
throws ReflectiveOperationException { | |
final String records; | |
final LogRecorder recorder = LogRecorderReflector.start( | |
getLogger(Logger.ROOT_LOGGER_NAME), // the logger whose log events are recorded | |
"%message%n", // the pattern for formatting log events |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#Linux/X11 | |
sudo apt-get build-dep qt5-default | |
#Build essentials | |
sudo apt-get -y install build-essential perl python git | |
#Libxcb | |
sudo apt-get -y install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev | |
#Qt Webkit | |
sudo apt-get -y install flex bison gperf libicu-dev libxslt-dev ruby | |
#Qt WebEngine/Ubuntu (all) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#do dos2unix if required | |
sudo apt-get -y update | |
sudo apt-get -y upgrade | |
sudo apt-get -y dist-upgrade | |
sudo apt-get -y autoremove | |
sudo apt-get -y autoclean | |
sudo apt-get -y clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# finds and export JAVA_HOME | |
#export JAVA_HOME=$(dirname $(dirname $(readlink -e /usr/bin/javac))) | |
export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
simple string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
int reverse(void * array, const size_t offset, const size_t length, const size_t size) { | |
void * temp = malloc(size); | |
if (temp == NULL) { | |
return EXIT_FAILURE; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <assert.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
#define swapa(type, a, b) { type t = a; a = b; b = t; } | |
#define swapb(type, a, b) { type t = *a; *a = *b; *b = t; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ArrOffLen<T> { | |
public boolean isValid() { | |
if (arr == null) { | |
return false; | |
} | |
if (off < 0) { | |
return false; | |
} | |
if (len < 0) { |
OlderNewer