Tuesday, December 25, 2012
Saturday, October 27, 2012
Tuesday, September 4, 2012
Friday, August 31, 2012
Acme Pair
The same fractal looking formation of the relationship of VXX and XIV with purple smoothed dynamics underneath.
Refer to this post for the source code of the accompanying Acme System in EasyLanguage.
And another view on long term Fibonacci waving of EURUSD versus the aussie and the Nasdaq.
And still another taken on past February. Seems my favorite workspace huh?
A new bullish channel in the forming at Qs, maybe nearing the ceiling of the channel sometime soon though.
Saturday, June 2, 2012
Saturday, February 18, 2012
Tuesday, February 14, 2012
Monday, February 6, 2012
Tuesday, January 31, 2012
Monday, January 30, 2012
Thursday, January 19, 2012
Monday, January 16, 2012
Sunday, January 15, 2012
Wednesday, January 4, 2012
CodingBat Array-3
Some neat pieces of code:
seriesUp
public int[] seriesUp(int n) {
int len=n*(n+1)/2, k=1,num=0;
int[] result=new int[len];
for (int i=0;i<n;i++){
for (int j=0;j<k&&i+j<len;j++){
result[num++]=j+1;
}
k++;
}
return result;
}
maxMirror
seriesUp
public int[] seriesUp(int n) {
int len=n*(n+1)/2, k=1,num=0;
int[] result=new int[len];
for (int i=0;i<n;i++){
for (int j=0;j<k&&i+j<len;j++){
result[num++]=j+1;
}
k++;
}
return result;
}
maxMirror
public int maxMirror(int[] nums) {
int len=nums.length,count=0,max=0,k=0;
for (int i=0;i<len;i++){
count=0;
for (int j=len-1;i+count<len&&j>-1;j--){
if(nums[i+count]==nums[j]){
count++;
}
else{
if (count>0){
max=Math.max(count,max);
count=0;
}
}
}
max=Math.max(count,max);
}
return max;
}
countClumps
countClumps
public int countClumps(int[] nums) {
int len=nums.length,count=0,result=0;
for (int i=0;i<len;i++){
count=0;
for (int j=i;j<len;j++){
if (nums[i]==nums[j]){
count++;
}
}
if (count>1){
result++;
i+=count-2;
count=0;
}
}
return result;
}
Tuesday, January 3, 2012
CodingBat String-3 sumNumbers
It puzzled me a bit so I thought to share this...
public int sumNumbers(String str) {
int len=str.length(),sum=0,count=0;
boolean num=false;
String tmp="";
for (int i=0;i<len;i++){
if (Character.isDigit(str.charAt(i))){
num=false;
tmp="";
count=0;
for (int j=i;j<len;j++){
if (Character.isDigit(str.charAt(j))){
count++;
num=true;
tmp+=str.charAt(j);
}
else{
if (num) {
break;
}
}
}
if (tmp.length()>0){
i+=count;
sum+=Integer.parseInt(tmp);
}
}
}
return sum;
}
public int sumNumbers(String str) {
int len=str.length(),sum=0,count=0;
boolean num=false;
String tmp="";
for (int i=0;i<len;i++){
if (Character.isDigit(str.charAt(i))){
num=false;
tmp="";
count=0;
for (int j=i;j<len;j++){
if (Character.isDigit(str.charAt(j))){
count++;
num=true;
tmp+=str.charAt(j);
}
else{
if (num) {
break;
}
}
}
if (tmp.length()>0){
i+=count;
sum+=Integer.parseInt(tmp);
}
}
}
return sum;
}
Subscribe to:
Comments (Atom)
AI Challenge 2011 (Ants) post mortem by xathisxathis.com/posts/ai-chall…
— Speed Trader (@SoftComputinLab) January 27, 2013
A Markov chain, named after Andrey Markov, is a mathematical system that undergoes transitions from one state to ano... en.wikipedia.org/wiki/Markov_ch…
— Speed Trader (@SoftComputinLab) January 25, 2013














