- Upvotes Received
- 4
- Posts with Upvotes
- 3
- Upvoting Members
- 4
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
24 Posted Topics
How can I cast a base class to a derived on at runtime. What I am trying to do is the following: I need a system which will hold the subscriptions, where a certain type of message, has an assigned Subscriber. When a message is received, it will bi forwarded … | |
Yesterday I started playing with Microsoft CTP async library and I came across awaitable pattern ... I followed some tutoral, but I have a newer version of ctp that tutorial was refering to so all info about that was useless. After looking over the internet how the new pattern looks … | |
Hello! I'm having problem with getting the checkbox state of a selected row inside table. I don't know if there is any specific function to determinate which row is selected so I've thought of the following... when the row is selected, style(background color) is applied to the tr element, so … | |
Consider those two function. When I load file, everything is fine, but then, when I want to save changes, the file is still being locked. Where is the catch? [CODE=C#] public static string Load(string loadPath = null) { string output; string file = loadPath == null ? _defaultFile : (_defaultFile … | |
Re: [URL="http://en.wikipedia.org/wiki/Reverse_Polish_notation"]Reverse Polish Notation[/URL] | |
Can someone explain me why this string extended method gives me an ArgumentOutOfRangeException (Index and count must refer to a location within the string. Parameter name: count), [CODE=C#] public static string Remove(this string str, char lower, char upper) { return str.Where(ch => ch <= upper && ch >=lower) .Aggregate(string.Empty, (current, … | |
So for example, I have an array like that: [CODE=C#]char[] pattern = "GCAGAGAG".ToCharArray();[/CODE] And what I would like to do is to extract out distinct values and its corresponding indexes(smallest one) from right to left where first letters does not count. example: reversed array: [COLOR="Green"]GAGAGACG[/COLOR] Distinct values are: [COLOR="Red"]A, C, … | |
Hello guys! At school we were given a homework to read some info from web page and display it. While surfing over net for some infos how to approach to this a came across at HTML Agility Pack. I decided to use it. But I have some problems with parsing … | |
So today at school I was given a task to create an application to apply convolution over image. I decided to load convolution cores from xml file. But, as this was the first time me working with xml I have no knowledge how to effective parse it. So here is … | |
So I have the following implementation of linked list: [CODE=c] #ifndef LINKED_LIST #define LINKED_LIST struct Student { char* name; char* surrname; char* signin_number; char* grade; char* date; struct Student* next; }; struct Student* begin = NULL; void push_back(struct Student* student) { struct Student* temp = NULL; if(begin == NULL) { … | |
So I am making a windows explorer like program and I want to implement file copying with streams ... so here i what I end up with: [CODE=c#] try { using (Stream input = new FileStream(@"F:\dmd-sepdawn.avi", FileMode.Open)) using (Stream output = new FileStream(@"c:\test\dmd-sepdawn.avi", FileMode.OpenOrCreate)) { int bufLength = 1024 * … | |
So I would like to make a function which would add elements in container in sorted manner. Let's say we have a struct with two integer. I randomly initialize them and the add it to deque. And now what I want is that my function would add them in a … | |
Hey, For my assignment I have to create a dialog with 6 radio buttons and one picture control. Radio buttons serves for setting the background color of picture control. Whenever the radio button selection is changed, background color is set to to its color settings. So I created Group Box, … | |
Can someone explain what am I doing wrong? I get "vector subscript out of range" error. Here is the sample ... [CODE=cplusplus] #include <vector> using std::vector; struct CUBE { int number; bool changed; }; int _tmain(int argc, _TCHAR* argv[]) { vector<CUBE *> cube; for (int i = 0; i < … | |
Re: For me, it is working with that ... [CODE=cplusplus]filestr.open( filename.c_str() );[/CODE] | |
Re: You forget [B]"[/B] before Tie between ". And your If statement ... first time you are checking if hnr is greater, secondly if it is lesser, so for the third options nothing else left than for them to be equal. So remove (hnr && bnr) <- which is also incorrect...if … | |
Re: Change [CODE=cplusplus]while( !GameOverWin );[/code] to [CODE=cplusplus]while( GameOverWin );[/code] | |
Re: Lame way to do it ... ;) [CODE=cplusplus] #include <iostream> #include <string> #include <conio.h> using namespace std; int main() { string pass = ""; int a; cout << "Enter password: "; do { a = _getch(); pass += char(a); cout << "*"; }while( a != 13 ); cout << endl … | |
So, i wrote stack, which is using vector strategy in case of being too small. The code compiles well and works until the resize function is called to resize the size of array. Tnx for any help solving this error. [CODE=cplusplus]#ifndef STACK_H #define STACK_H const int DEFAULT_SIZE = 10; template … | |
Re: So I take a look at this problem, become interested in solving it, but without success. Can anybody explain to me why this code does not work? It leaves the original string untouched... [CODE=c]void remove(char *aft) { char *key = "aeiouAEIOU"; int i, j, k = 0; for ( i … | |
I have to write a template that would swap two arguments, if second one is smaller than first. But in case of string beeing passed to function it would swap them, if second is smaller than first by length. Is it possible to implement that using just one template? Here … | |
Hello! I am making a postfix calculator and I want to add in some equation integrity checking. Everything seems to work ( it needs to be done some little improvements, but overall it is working), except when I am checking for the blank spaces the program do not work the … | |
Hello! So, I have a problem with the following code... I'd like to know, why the variables pid and ppid are not initialized? Inside the if scope, if I print them out, they are initialized to getpid() and getppid() value, but when I want to print them out in else … |
The End.