Skip to content

Instantly share code, notes, and snippets.

@vazexqi
vazexqi / Markdown Rendering
Created January 23, 2011 17:16
This rendering works fine here but has trouble on a wiki page
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 February 8, 2011 07:50
Example illustrating assertion failed: (fileNameCounter == 1), function buildCommandLineToSubstituteTransformationFile
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 / content.xml
Created March 29, 2011 22:52
This patch shows an example of how to "widen" the range for the patching mechanism
<?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 April 6, 2011 18:05
Shows how XMLEncoder would encode the information in a problem marker for Eclipse
<?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 05:35
Various APIs for Futures/Promises for the JVM. For complete code, see https://github.com/vazexqi/JVMFuturesExploration
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 06:36
Sequential analysis for stock
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);
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 February 6, 2013 21:33
This file shows the types of checks that we perform and the types of error messages that we can report.
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 February 20, 2013 06:35
My .tmux.conf file.
# .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
@vazexqi
vazexqi / build.gradle
Created February 24, 2013 16:52
sfl4j logging with Groovy using Gradle to manage dependencies (build.gradle) See http://vazexqi.github.com/posts/2013/02/24/groovy-sfl4j.html
apply plugin: 'groovy'
repositories {
mavenCentral()
// For newer/beta versions of Groovy