Skip to content

Instantly share code, notes, and snippets.

Ngoc Dao ngocdaothanh

Block or report user

Report or block ngocdaothanh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View one.jsp
<%--
Document : one
Created on : 24/03/2017, 3:37:22 PM
Author : Tyler
--%>
<html>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<head>
View introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

View catalina.out
SUBMITTING job 2014y-3m-8d-9h-40m-44s-236r from 1.72.4.228 (1.72.4.228)
SARTING job 2014y-3m-8d-9h-40m-44s-236r at Sat Mar 08 09:40:44 EST 2014
Primer3 returned no oligos for sequence ACCAATGGTGGCGCGATGTAACACGAGAAAGCACATACCAAGGCCACCACACACCACCTGTCCAAAAAGGCCTTCGATACGGGATAATCCTATTTATTACCTCAGAAGTTTTTTTCTTCGCAGGATTTTTCTGAGCCTTTTACCACTCCA
Primer3 returned no oligos for sequence GCACATACCAAGGCCACCACACACCACCTGTCCAAAAAGGCCTTCGATACGGGATAATCCTATTTATTACCTCAGAAGTTTTTTTCTTCGCAGGATTTTTCTGAGCCTTTTACCACTCCAGCCTAGCCCCTACCCCCCAACTAGGAGGGC
Primer3 returned no oligos for sequence TCCAAAAAGGCCTTCGATACGGGATAATCCTATTTATTACCTCAGAAGTTTTTTTCTTCGCAGGATTTTTCTGAGCCTTTTACCACTCCAGCCTAGCCCCTACCCCCCAACTAGGAGGGCACTGGCCCCCAACAGGCATCAACCAATGGT
Primer3 returned no oligos for sequence TATTTATTACCTCAGAAGTTTTTTTCTTCGCAGGATTTTTCTGAGCCTTTTACCACTCCAGCCTAGCCCCTACCCCCCAACTAGGAGGGCACTGGCCCCCAACAGGCATCAACCAATGGTGGCGCGATGTAACACGAGAAAGCACATACC
Primer3 returned no oligos for sequence CAGGATTTTTCTGAGCCTTTTACCACTCCAGCCTAGCCCCTACCCCCCAACTAGGAGGGCACTGGCCCCCAACAGG
@ngocdaothanh
ngocdaothanh / rtsp_to_file.sh
Created Dec 8, 2013
Use ffmpeg to save NVC1000 & IPE300M video streams to files
View rtsp_to_file.sh
ffmpeg -i rtsp://211.241.204.87/ch0_unicast_firststream -vcodec msmpeg4v2 -an output.avi
ffmpeg -i rtsp://211.241.204.87/ch0_unicast_secondstream -vcodec msmpeg4v2 -an output.avi
View build-ffmpeg.sh
#!/bin/bash
###########################################################################
# Choose your ffmpeg version and your currently-installed iOS SDK version:
#
VERSION="2.1.1"
SDKVERSION="7.0"
#
#
###########################################################################
@ngocdaothanh
ngocdaothanh / gist:7315180
Last active Dec 27, 2015
Hazelcast Topic 2.5.1 vs 3.1
View gist:7315180
// https://docs.google.com/file/d/0B4nP_B5KDxyPdnFySDJhVDI2Ujg/edit?usp=sharing
// https://groups.google.com/forum/#!searchin/hazelcast/ngoc/hazelcast/aeSPHp82Dcs/R5ZzkIfvCukJ
package test
import com.hazelcast.core.Hazelcast
object TestManyTopic {
def main(args: Array[String]): Unit = {
val c = null//new Config
View gist:6914654
C:\Users\tanaka\Downloads\xitrum-demos-2.10\target\xitrum>java -Xmx1024m -Xms256m -XX:MaxPermSize=128m -XX:+HeapDumpOnOutOfMemoryError -XX:+Aggressive
Opts -XX:+OptimizeStringConcat -XX:+UseFastAccessorMethods -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+CMSClassUnloadi
ngEnabled -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=1 -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.awt.headless=
true -server -Dxitrum.mode=production -cp "C:\Users\tanaka\Downloads\xitrum-demos-2.10\target\xitrum\bin\..\lib\*;config" demos.Boot
[INFO] Slf4jLogger started
[INFO] Using configuration file at C:\Users\tanaka\Downloads\xitrum-demos-2.10\target\xitrum\config\hazelcast_cluster_member.xml
[INFO] Using configuration file at C:\Users\tanaka\Downloads\xitrum-demos-2.10\target\xitrum\config\hazelcast_cluster_member.xml
[INFO] Prefer IPv4 stack is true.
[INFO] Picked Address[192.168.1.12]:5701, using socket ServerSocket[addr=/0.0.0.0,localport=5701], bind any local is tr
View output
[info] Set current project to bar (in build file:/Users/ngoc/tmp/x/)
[info] Generating Scala API documentation for main sources to /Users/ngoc/tmp/x/target/scala-2.10/api...
model contains 4 documentable templates
java.lang.AssertionError: assertion failed:
while compiling: /Users/ngoc/tmp/x/src/main/scala/foo/B.scala
during phase: global=terminal, atPhase=typer
library version: version 2.10.1
compiler version: version 2.10.1
reconstructed args: -Yno-self-type-checks -d /Users/ngoc/tmp/x/target/scala-2.10/api -classpath dummy_82279db5 -bootclasspath /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsfd.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/laf.jar:/System/Libra
View gist:4648313
// From http://code.google.com/p/android-native-egl-example/
#include <stdint.h>
#include <unistd.h>
#include <pthread.h>
#include <android/native_window.h> // requires ndk r5 or newer
#include <EGL/egl.h> // requires ndk r5 or newer
#include <GLES2/gl2.h>
#include "logger.h"
@ngocdaothanh
ngocdaothanh / gist:4544582
Created Jan 16, 2013
Chromium/src/out/Release directory
View gist:4544582
This file has been truncated, but you can view the full file.
.
├── AHEM____.TTF
├── android_fallback_fonts.xml
├── android_main_fonts.xml
├── android_webview
│   ├── AndroidManifest.xml
│   ├── AndroidManifest.xml.d
│   ├── AndroidWebView.ap_
│   ├── AndroidWebView.ap_.d
You can’t perform that action at this time.