r/CircleProgramming • u/Illuminatesfolly • Feb 20 '13
r/CircleProgramming • u/[deleted] • Dec 15 '12
MFW the author of ROCR multiplies denominator of Matthews Correlation Coefficient before taking the square root
r/CircleProgramming • u/[deleted] • Dec 13 '12
Any Rfags here? Am trying to plot some ROC, Lift, Gain curves.
r/CircleProgramming • u/LordCupcakeIX • Dec 12 '12
I doubt it'll take off, but something to keep tabs on: "5 years ago there was refactormycode.com, but it seems to have died and is no longer maintained. So I decided to create a similar site to allow people to help each other for fun and learning" [/r/coding]
r/CircleProgramming • u/AerateMark • Dec 11 '12
I updated the Nostalgia Enchantment Suite script.
http://userscripts.org/scripts/review/150896
Now supports more people.
r/CircleProgramming • u/Illuminatesfolly • Dec 13 '12
MATLAB: So, this is MotifCatcher. This isn't even its final form.
r/CircleProgramming • u/Illuminatesfolly • Dec 22 '12
[Mod Mod Mod Mod] Hobby Projects
Hey Guys,
Would you be interested in doing some hobby projects together? Maybe some contests? Down for a homework support system? I, for one, am going to be in one super easy class and one super difficult one next quarter and would love help.
Anyways, post ideas.
r/CircleProgramming • u/Illuminatesfolly • Jan 10 '13
I have to learn R and C this quarter.
And I already hate both of them.
Whenever I program in them, it is like being trapped in a loveless marriage where I am always thinking of java.
ALso, R is literally MATLAB lite
r/CircleProgramming • u/Illuminatesfolly • Dec 12 '12
Java.DAE?
You might be aware that I designed my first comprehensive piece of software in Java -- wherein a Fasta-Markov model iterative process computes meta-motifs for regulatory protein binding sites.
euhuehuehuehuehueheuheu
r/CircleProgramming • u/writetehcodez • Dec 30 '12
CodeSense: Implementing Methods
brian-driscoll.comr/CircleProgramming • u/dtptampa • Dec 11 '12
DAE MATLAB???
Only 90's [ent]gineers will get this!
r/CircleProgramming • u/AerateMark • Jan 08 '13
>mfw never-ending-reddit has event
document.body.addEventListener('DOMNodeInserted', function(event) {
if ((event.target.tagName == 'DIV') && (event.target.getAttribute('id') && event.target.getAttribute('id').indexOf('siteTable') != -1)) {
// whatever you need fired here
}
}, true);r/CircleProgramming • u/Illuminatesfolly • Dec 17 '12
The Fast Fourier Transform
r/CircleProgramming • u/AbstergoSupplier • Dec 12 '12
Where was this sub when I had programming assignments every week that I killed myself attempting to complete?
r/CircleProgramming • u/Illuminatesfolly • Feb 11 '13
Guise, I need serious help with a complex mess of pointers. Please fix this code.
/*****************************************************************************
* Chris Campbell (cacampbe) and Denney Kwok (denneyk)
* ECS 30 Homework 3 Problem 6
* pointers.c
*****************************************************************************/
/**
* Reminder.
* Main() should be the first function.
* Prototypes must define functions before main()
* No Loops, Arrays or Global Variables (Fields)
*/
//Inclusions and Definitions
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
//Fields
//Prototypes
void operate(int, int, int);
void operate2(int, int, int, int);
void InitialPrint();
void SecondPrint();
bool CheckAddress(int, int, int, int);
void Operations(int, int);
bool Restart1(int, int, int, bool);
bool Restart2(int, int, int, bool, int);
//Methods
int main()
{
int a, b, c;
setvbuf(stdout, NULL, _IONBF, 0);
printf("The addresses are num: %u, num2: %u, num3: %u\n",
(unsigned) &a, (unsigned) &b, (unsigned)&c);
operate(&a, &b, &c)
printf("Done.\n");
return(0);
} //main()
void operate(int* a, int* b, int* c)
{
int* firstaddress;
bool test;
bool restart;
InitialPrint();
scanf("%u", (unsigned*) &firstaddress);
test = CheckAddress(a, b, c, firstaddress);
restart = Restart1(a, b, c, test);
if (restart)
{
operate2(a, b, c, firstaddress);
}
return;
} //operate()
void operate2(int* a, int* b, int* c, int* firstaddress)
{
int* secondaddress;
bool test;
bool restart;
SecondPrint();
scanf("%u", (unsigned*) &secondaddress);
test = CheckAddress(a, b, c, secondaddress);
restart = Restart2(a, b, c, test, firstaddress);
if (restart)
{
Operations(firstaddress ,secondaddress);
}
return;
} //operate2()
void InitialPrint()
{
printf("Please enter int address #1: ");
return;
} //InitialPrint()
void SecondPrint()
{
printf("\nPlease enter int address #2: ");
return;
} //InitialPrint()
bool CheckAddress(int a, int b, int c, int address)
{
bool test = false;
if (address == (unsigned)&a || address ==
(unsigned)&b || address == (unsigned)&c)
{
printf("That is a valid address.\n");
test = true;
}
else
{
printf("That is not a valid address.\n");
}
return test;
} //CheckAddress1()
bool Restart1(int a, int b, int c, bool test)
{
bool otherBool = false;
if (test)
{
otherBool = true;
}
else
{
operate(a, b, c);
}
return otherBool;
} //Restart()
bool Restart2(int a, int b, int c, bool test, int firstaddress)
{
bool otherBool = false;
if (test)
{
otherBool = true;
}
else
{
operate2(a, b, c, firstaddress);
}
return otherBool;
} //Restart2()
void Operations(int firstaddress, int secondInt)
{
int firstInt;
int operand;
char operator;
printf("Please enter an integer: ");
scanf("%d", (unsigned*) &operand);
printf("\nPlease enter an operator: ");
scanf("%c", &operator);
switch (operator)
{
case '+':
firstInt = firstaddress;
secondInt = firstInt + operand;
printf("\nFirst int: %d, second int: %d.\n", firstInt, secondInt);
break;
case '*':
firstInt = firstaddress;
secondInt = firstInt * operand;
printf("\nFirst int: %d, second int: %d.\n", firstInt, secondInt);
break;
case '=':
firstInt = firstaddress;
secondInt = firstInt;
printf("\nFirst int: %d, second int: %d.\n", firstInt, secondInt);
break;
case '%':
firstInt = firstaddress;
secondInt = firstInt % operand;
printf("\nFirst int: %d, second int: %d.\n", firstInt, secondInt);
break;
default:
printf("\n%c is an invalid operator.\n", operator);
break;
}
return;
}//Operations()r/CircleProgramming • u/Illuminatesfolly • Jan 26 '13
Emailed my Professor...
Hello Professor,
A) A few of my classes use Piazza (which sent me the forwarded email). It is a helpful forum for class discussion and it might benefit us as a class.
B) Here is an excellent resource comparing MATLAB to R -- in case students are interested in how the two relate as languages: PDF: http://www.math.umaine.edu/~hiebeler/comp/matlabR.pdf
C) Your office hours are held when I have Physics Lab (unfortunate). Are you available this coming monday for an appointment? I would love to have last minute help with the homework assignment and an opportunity to clarify topics that I don't have a firm grasp on due to the quick pacing and in depth nature of the class.
Regards,
Chris Campbell
997-29-7975
I do not use commercial products in my classes (even "free" ones).
So far, no other students have expressed an interest in MATLAB but I will pass this on if they do. I don't use software for courses that is not open source. GNU Octave is an open source alternative that has essentially the same syntax as MATLAB, but neither program is used much for bioinformatics or statistical analysis.
Monday is full. I could meet with you Tuesday at 3 pm.
Fucking Seriously? Who writes shit like this to someone that is interested in improving the course material and seeking help with understanding genetic analysis?
"sniffs farts -- Yeah, I never use those corporate products in my classes. MATLAB is so fake and gay and doesn't even lift when it comes to bioinformatics."
I mean, it's not like I just spent several months of my time writing a fasta markov model Motif Finding Program... in MATLAB. There's a fucking reason that people use it rather than R. Sure, I can now appreciate that R is pretty cool and doesn't afraid of anything, but the fact that nobody has expressed interest in its similarity to other languages doesn't mean that you are right you arrogant hippie douche, it just means that nobody knows any other languages.
And his office hours schedule is stupid too.
r/CircleProgramming • u/Illuminatesfolly • Feb 04 '13
Try-Catch with C.
How would I write a simulated try-catch block to shelter file streams in C? C sucks.
r/CircleProgramming • u/Illuminatesfolly • Feb 15 '13
Alternative for fgetln?
Hi guise, the following code compiles perfectly well and runs as expected on mac and linux, but on windows (the operating system of my professor), stdio does not include the function fgetln.
Is there some way that I can fix this problem in under 5 minutes? (the amount of time that I have to make corrections?
Can you please edit / explain with my conventions how to use something like getline or fgets to fix this?
thx.
if you would like the rest of the program and a test file, I can supply that as well -- it is just over 10,000 characters.
void ReadFileAndGatherStats()
{
FILE* inFile; //The File steam pointer.
double thingsPerLine; //The read in value of the first line -- denotes how
//many objects will be on each line of the file.
char *line; // Line pointer from / for the steam to reference.
size_t length; //arbitrary length pointer for stream
int printCount = 0; //define and initialize the variable that will keep track
//of the number of printed pseudo-lines (essentially, one call of processLine)
double tempLineVal = 0; //this variable tracks the temprary return values of
//processLine as it is called for each line.
double fileTotal = 0; //define and initialize the variable for the total file
//total.
double numberEntries; //The number of entries in the file in total.
double fileAverage; //the average of the numbers in the file.
double squaredMean; //The mean of the values in the file.
double squaredMeanSum; //The squared mean sum of the numbers in the file.
double std; //the standard deviation of the values in the file.
TRY
{ //try to open the file.
inFile = fopen("stats_data.txt", "r");
//file stream.
if(inFile == NULL) {THROW;}
//If the file stram is null, exception is thrown.
thingsPerLine = readFirstLine(inFile);
//read the first line of the file (one integer), in order to determine
//the number of things per line.------->while ((line = fgetln(inFile, &length)) != NULL)
{//read the remainder of the file line by line until the read line is null.
printCount++; //for each iteration, increment the number of prints to the
//screen.
tempLineVal = processLine(inFile, thingsPerLine, &squaredMean);
//process the line and print the values.
fileTotal = fileTotal + tempLineVal;
//file total - without using += for some reason.
squaredMeanSum = squaredMeanSum + squaredMean;
//squaredMeanSum added to.
if (printCount % 2 == 0) { printf("\n"); }
//if two pseudo-lines have passed, new line (program specs).
} //done reading the file.
fclose(inFile); // close the stream.
if (printCount % 2 != 0) //after the stream has closed, calculate overall
{ //statistics for the file, adding a new line if there was an odd number
//of pseudo-lines printed to the screen during the loop.
printf("\n");
}
fileTotal = fileTotal + thingsPerLine;
//add the first line number to the total from the remainder of the file.
numberEntries = (double)printCount * thingsPerLine + 1;
//get the total number of things in the file.
fileAverage = fileTotal / numberEntries;
// calculate the average for the entire file.
std = calculateSTD(fileAverage, numberEntries);
//calculate the standard deviation for the entire file.
printOverallStats(fileAverage, std);
//print the overall statistics for the file.
}
CATCH { printf("File Read Exception."); }
ETRY;
return;
} //ReadFile();r/CircleProgramming • u/Hetzer • Feb 22 '13
Job interview programming problems?
So I just totally struck out on a job interview for a position I was having serious second thoughts about anyway. It was done over google hangout so I could share my screen to show me writing psuedocode and coding.
The first/only problem they gave me was how to take a group of words (as an array of strings) and group them by anagram. Like if you had an input of (arm, armor, ram, and mar) you would group arm, ram, and mar but leave out armor (I guess). The eventual solution they showed me didn't really answer the initial question, now that I think of it. It was basically create an associative array where each word in the input string is a key and make all of its anagrams be values for that key.
I didn't get the associative array solution plus I kind of blanked knowing any php on top of not having seriously coded anything in PHP in like a year. So I'm not gonna get the job. [/livejournal]
Anyway, what experiences (if any) have you guys had with programming problems in job interviews?
r/CircleProgramming • u/Illuminatesfolly • Jul 19 '13
Guise. Help
So, it's well known that JARs and the IDEs that make them handle classpaths a little differently.
So, how do I fix the null pointer exception given to me when I attempt to load the configfile for a frame for code like this:
>String ConfigFile = this.getClass().getClassLoader().getResource(".").getPath().concat("ConfigFile.txt");This code works fine through the IDE but does not work at all in the JAR. Wut do?
r/CircleProgramming • u/cokeisahelluvadrug • Jul 21 '13
Anyone want to work on natural language processing?
Hey, so I'm reinstalling cygwin, PRAW, and nltk right now. I'm planning on tinkering around with natural language processing on reddit, to see if I can suss out any interesting relationships. I have an SQL server running already that I'm planning on working with.
If anyone is interested in working with me we can set up a git repo and maybe discuss what we want to do.
r/CircleProgramming • u/Illuminatesfolly • Jul 10 '13
C / C++ / C# application using XCode + Cocoa
You know MotifCatcher? The love and hate of my life that I have been perpetually working on for over a year (mostly to learn how to design software)?
Well, I am either going to rewrite it (more better) in java, or attempt to write a C derived GUI for Mac (the computers at the lab). I don't know the first thing about GUI coding in C languages, and I know it would be easier just to create a webapp, but, I want to do this.
Where do I start? pls respond.