4 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for vegaseat

A little experiment with custom sorting the result of a word frequency count using Google's Go language.

Member Avatar for vegaseat
2
3K
Member Avatar for vegaseat

Again, calculate the minimum number of bills or coins required for a given amount of money (change). This time we will use a Go map instead of a csv string converted to a structure.

0
407
Member Avatar for vegaseat

Use Google's modern Go language (aka. golang) to convert a denary number (base 10) to a roman numeral. Just a good exercise to explore Go's map, slice, sort and for loop features. Note that in Go the **:=** is shorthand for assigning a type (by inference) and a value to …

2
577
Member Avatar for gauravkr

#ifndef _READFILE_H_ #define _READFILE_H_ #include<string> #include<vector> #include<map> using namespace std; class Readfile{ private: string str; vector <string> goArray; vector <string> strArray; vector <string> phyIntArray; vector <string> subArray; vector <string> proArray; /* member function */ void processString(string str); void processGoId(string); void processPhysicalInt(string); // void processMetabolicInt(string); public: typedef struct Info{ string uniprotID; …

Member Avatar for gauravkr
1
182

The End.