I wrote the following code one year ago to return a list of all the current windows
#include
#include
using namespace std;
BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam)
{
TCHAR buffer[512];
…
So I have this code I wrote to read from information from twitters REST API using tweepy and I'd like to collect a lot of information without exceeding the rate limit. This question is more of a conceptual one than tweepy-related. So far this is…
When the class Dog inherits from the class Animal, we say that 'Dog is an Animal'.
When the class Dog has a property Name, we say that 'Dog has a Name'.
When the class Dog has a method void Sleep(), we say that 'Dog can Sleep'.
What do we say when a…
My End Goal:
Create the implementation of a hash-table from scratch. The twist, if the number of entries in a hash bucket is greater than 10 it is stored in Binary Search Tree, or else it is stored in a Linked List.
In my knowledge the only way to…
I want to create an enumeration like object but with an additional "property".
For example I could have a day of the week enumeration:
enum Day {Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday };
Now, let's say I have another…
I'm trying to find all possible ways to arrange N elements in A boxes, where doesn't matter the order of the boxes and the order of the elements, but it does matter which elements are together at the same box. For example, the expected result for 3…
I'm building a validation function for a particular enumeration data type. The validation function returns 0 (false) or 1 (true) if string passed is valid. At the same time, if the string is valid, then the enumeration subType is then populated with…
I wrote this in VB.NET, but I am comfortable with C# as well. I have a list of files that I want to find on a Windows file system. Based on the file name, I will need to look in a different directory. The list of files that I have is a list that…
I knew how to do this but forgot again... Quite irritating, because I'm working on a class that contains a list of XML files, and now I just want to use a for-in loop to walk through all files in this list. This is the class I have right now:
type
…
I've started studying C in the university. The professor gave us a task - to write a program that counts the number of comments in an another C program. We still haven't talked about operating with files. I found a similar solution - C Program to…
I am currently developping an ESB (3.7.0 CE) mule application and I am using Poll component with fixed-frequency-scheduler. I would like to externalize timeUnit scheduler's attribute as below:
i would like to have in my class a nested hastable to set the amount of ingredients. Please consider the following scenario.
Scenario:
One recipe has several ingredients:
public class Ingredient {
private static int id;
String name;
…
I have a class, let's say Player, with a name and some attributes:
public class Players
{
public string PlayerName { get; set; }
public IList Goals { get; set; }
...
}
I want to create a custom collection class, PlayerCollection,…