Skip to content

Instantly share code, notes, and snippets.

View LongClipeus's full-sized avatar
:atom:
Focusing

Long Le Van LongClipeus

:atom:
Focusing
View GitHub Profile
@LongClipeus
LongClipeus / DemoServlet.java
Last active November 29, 2018 03:41
Writting a string from servlet java to javascript
package servlet;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@LongClipeus
LongClipeus / TestServlet.java
Last active November 29, 2018 07:16
call function in servlet from javascript
package servlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@LongClipeus
LongClipeus / Install OMNeT++.md
Last active December 1, 2018 07:48
How to install OMNeT++ in Ubuntu

Installing the Prerequisite Packages

$ sudo apt-get update

To install the required packages, type in the terminal:

$ sudo apt-get install build-essential gcc g++ bison flex perl tcl-dev tk-dev libxml2-dev zlib1g-dev default-jre doxygen graphviz libwebkitgtk-1.0-0

To use Qtenv with 3D visualization support, install the development packages for Qt4, OpenSceneGraph (3.2) and the osgEarth (2.5 or later) packages:

@LongClipeus
LongClipeus / HelloJNI.java
Last active May 14, 2022 16:35
Example JNI/C++ Hello World in Ubuntu
public class HelloJNI {
static {
System.loadLibrary("hello"); // load libhello.so
}
private native void sayHello();
public static void main(String[] args) {
new HelloJNI().sayHello();
}
@LongClipeus
LongClipeus / DCT-2D.cpp
Created January 6, 2019 02:50
The Discrete Cosine Transform: DCT-2D
#include <iostream>
#include <fstream>
#include <math.h>
using namespace std;
#define LEN 8
#define PI 3.141592654
const char *FILEPATH = "document.txt";
@LongClipeus
LongClipeus / LedMatrix.c
Last active January 15, 2019 05:37
Library led matrix
#include "BTL_ViXuLy.h"
#include "LedMatrix.h"
#include "Librarie.h"
/* ------------------ Config ------------------ */
#define ST PORTCbits.RC0 // CHAN ST
#define SH PORTCbits.RC1 // CHAN SH
#define DS0 PORTCbits.RC2 // CHAN D
#define DS1 PORTCbits.RC3 // CHAN C
/* ------------------ Config ------------------ */
#define ST 3 // CHAN ST
#define SH 2 // CHAN SH
#define DS0 5 // CHAN D
#define DS1 4 // CHAN C
/*
#define ST digitalRead(3) // CHAN ST
#define SH digitalRead(2) // CHAN SCK
#define DS0 digitalRead(5) // CHAN DataR
@LongClipeus
LongClipeus / Install Javafx Scene Builder.md
Last active March 26, 2020 04:45
Install Javafx Scene Builder into Eclipse in Ubuntu 16.04 LTS
@LongClipeus
LongClipeus / Install e(fx)clipse.md
Last active February 16, 2019 06:24
Install e(fx)clipse into Eclipse in Ubuntu 16.04 LTS

1. Get link to install

Go to address https://www.eclipse.org/efxclipse/releases.html

The latest version of e(fx)clipse is 3.3.0 (2018-05-31). Copy one of the URL (Ex: http://download.eclipse.org/efxclipse/updates-released/3.3.0/site )

2. Installing in Eclipse

Select Help -> Install New Software...

@LongClipeus
LongClipeus / install FFmpeg.md
Last active March 14, 2019 06:37
How to compile and install FFmpeg on Ubuntu 16.04 LTS

Install the dependencies

sudo apt-get -y install build-essential autoconf automake cmake libtool git \
checkinstall

mkdir ffmpegtemp
cd ffmpegtemp

mkdir aom