Skip to content

Instantly share code, notes, and snippets.

Nick Chen vazexqi

Block or report user

Report or block vazexqi

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
@vazexqi
vazexqi / Markdown Rendering
Created Jan 23, 2011
This rendering works fine here but has trouble on a wiki page
View Markdown Rendering
1. Item 1
1. Item 2
1. Item 3
1. Item 4
1. Item 5
1. Item 6
1. Item 7
1. Item 8
1. Item 9
1. Item 10
@vazexqi
vazexqi / Output.txt
Created Feb 8, 2011
Example illustrating assertion failed: (fileNameCounter == 1), function buildCommandLineToSubstituteTransformationFile
View Output.txt
daigo:ROSE_Experiments vazexqi$ build/Rewrite_ROSE.out examples/simple.cpp
"/usr/include/sys/cdefs.h", line 140: warning: incompatible redefinition of
macro "__dead2" (declared at line 148 of
"/usr/local/rose/include/g++_HEADERS/rose_edg_required_macros_and_fun
ctions.h")
#define __dead2 __attribute__((__noreturn__))
^
"/usr/include/sys/cdefs.h", line 141: warning: incompatible redefinition of
macro "__pure2" (declared at line 149 of
@vazexqi
vazexqi / pre-commit
Created Mar 23, 2011
Checks for non-ASCII characters or files that are too long
View pre-commit
#!/bin/sh
#
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
@vazexqi
vazexqi / content.xml
Created Mar 29, 2011
This patch shows an example of how to "widen" the range for the patching mechanism
View content.xml
<?xml version='1.0' encoding='UTF-8'?>
<?metadataRepository version='1.1.0'?>
<repository name='Update Site' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1'>
<properties size='2'>
<property name='p2.timestamp' value='1300688960908'/>
<property name='p2.compressed' value='true'/>
</properties>
<units size='45'>
<unit id='org.eclipse.ltk.core.refactoring' version='3.9.100.201103210128'>
<update id='org.eclipse.ltk.core.refactoring' range='[0.0.0,3.9.100.201103210128)' severity='0'/>
@vazexqi
vazexqi / ProblemMarkerSample.xml
Created Apr 6, 2011
Shows how XMLEncoder would encode the information in a problem marker for Eclipse
View ProblemMarkerSample.xml
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.6.0_24" class="java.beans.XMLDecoder">
<object class="edu.illinois.codingspectator.refactoringproblems.logger.RefactoringProblem">
<void property="persistableAttributes">
<object class="java.util.HashMap">
<void method="put">
<string>id</string>
<string>33554772</string>
</void>
<void method="put">
@vazexqi
vazexqi / akkaFutures.scala
Created May 17, 2012
Various APIs for Futures/Promises for the JVM. For complete code, see https://github.com/vazexqi/JVMFuturesExploration
View akkaFutures.scala
override def doAnalysisParallel() = {
implicit val executor = ExecutionContext.fromExecutorService(new ForkJoinPool())
val nyseData = Future(loadNyseData())
val nasdaqData = Future(loadNasdaqData())
val mergedMarketData = for {
nyse <- nyseData
nasdaq <- nasdaqData
@vazexqi
vazexqi / Sequential.java
Created May 17, 2012
Sequential analysis for stock
View Sequential.java
public void doAnalysisSequential() {
StockDataCollection nyseData = loadNyseData();
StockDataCollection nasdaqData = loadNasdaqData();
StockDataCollection mergedMarketData = mergeMarketData(Arrays.asList(nyseData, nasdaqData));
StockDataCollection normalizedMarketData = normalizeData(mergedMarketData);
StockDataCollection fedHistoricalData = loadFedHistoricalData();
StockDataCollection normalizedHistoricalData = normalizeData(fedHistoricalData);
StockAnalysisCollection analyzedStockData = analyzeData(normalizedMarketData);
MarketModel modeledMarketData = runModel(analyzedStockData);
StockAnalysisCollection analyzedHistoricalData = analyzeData(normalizedHistoricalData);
View main.f90
PROGRAM SUBDEM
REAL A,B,C,SUM,SUMSQ
CALL INPUT( + A,B,C)
CALL CALC(A,B,C,SUM,SUMSQ)
CALL OUTPUT(SUM,SUMSQ)
END
@vazexqi
vazexqi / FileFormatCheckerTest.groovy
Created Feb 6, 2013
This file shows the types of checks that we perform and the types of error messages that we can report.
View FileFormatCheckerTest.groovy
package edu.illinois.vlsicad.tests
import edu.illinois.vlsicad.core.FileFormatChecker
import edu.illinois.vlsicad.core.URPException
class FileFormatCheckerTest extends GroovyTestCase {
void testValidFile() {
// Should not have any exceptions thrown
FileFormatChecker checker = new FileFormatChecker(file: new File("test3.cubes"))
checker.checkFileFormat()
@vazexqi
vazexqi / .tmux.conf
Created Feb 20, 2013
My .tmux.conf file.
View .tmux.conf
# .tmux.conf file inspired from Pragmatic Tmux
# http://pragprog.com/book/bhtmux/tmux
# Default to zsh with support for Mac OS X clipboard
set -g default-command "reattach-to-user-namespace -l /bin/zsh"
# https://wiki.archlinux.org/index.php/Tmux
# Set more scrollback history
# START:scrollback
set -g history-limit 10000
You can’t perform that action at this time.