Code Snippet Minimum number of bills or coins in change (golang) This Go snippet calculates the minimum number of bills or coins needed for a given amount of money (change) requested. The program also gives the denomination and number. US curency is used in this example, but can be changed to another currency. +1 Code Snippet A slice of structures (golang) Another little adventure into Go coding. This time a slice (a Go open ended array) of structures is used as a record for some data processing. For those who miss the ; at the end of a line of code, you can use them, but the lexer of the compiler will put them in for you. Go slices are simpler to work with and faster than traditional arrays, even though they use arrays as a backbone. Go was written for efficiency and speed of compilation in mind, it is intolerant of unused imports and unused variables. The reason you will … +1 Code Snippet Generating Grid Coordinates So, basically im using the codea bove to generate coordinates for a grid, but I only want to generate coordinates for the "outer ring" of a square. SO imagine a grid of 7x7, I won't generate coordinates for the inner 5x5 square, only for the outer ring. Basically I drew it all out on paper, used fake numbers and based off that I came up with t his logic that can be changed around. In the code "25" is used as dummy data for the distance between the center of one square and another. The 150 that you see can … +0 Code Snippet Three ways to convert an integer to a roman numeral Although [url=http://en.wikipedia.org/wiki/Roman_numerals]roman numerals[/url] sneak in our lives from time to time, we(luckily) don't use them very often. Probably the reason why the Romans where not that good at calculating things. That changed, more than 1000 years later, with [url=http://en.wikipedia.org/wiki/Fibonacci]this person[/url] who introduced to the Western world the number system we all use today. But let's come to the point: this is not about a conversion but about the ways to do it. I don't even refer to the algoritm used, but C# seems to become such a rich expressive language that I'm beginning to have trouble choosing a way to … +0 Code Snippet How to access map outside the class #ifndef _READFILE_H_ #define _READFILE_H_ #include #include #include using namespace std; class Readfile{ private: string str; vector goArray; vector strArray; vector phyIntArray; vector subArray; vector proArray; /* member function */ void processString(string str); void processGoId(string); void processPhysicalInt(string); // void processMetabolicInt(string); public: typedef struct Info{ string uniprotID; vector goId; vector phyInt; }; map proteinData; map ::iterator it; Readfile(string file);//constructor }; #endif +1

The End.