Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
4
Posts with Upvotes
3
Upvoting Members
4
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
Ranked #4K
~12.3K People Reached

24 Posted Topics

Member Avatar for bunnyboy

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 …

Member Avatar for bunnyboy
0
237
Member Avatar for bunnyboy

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 …

Member Avatar for kvprajapati
0
210
Member Avatar for bunnyboy

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 …

Member Avatar for migcosta
0
3K
Member Avatar for bunnyboy

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 …

Member Avatar for bunnyboy
0
212
Member Avatar for vbx_wx

[URL="http://en.wikipedia.org/wiki/Reverse_Polish_notation"]Reverse Polish Notation[/URL]

Member Avatar for bunnyboy
0
92
Member Avatar for bunnyboy

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, …

Member Avatar for apegram
0
357
Member Avatar for bunnyboy

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, …

Member Avatar for bunnyboy
0
102
Member Avatar for bunnyboy

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 …

Member Avatar for bunnyboy
2
182
Member Avatar for bunnyboy

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 …

Member Avatar for bunnyboy
1
104
Member Avatar for bunnyboy

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) { …

Member Avatar for bunnyboy
0
97
Member Avatar for bunnyboy

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 * …

Member Avatar for sknake
0
134
Member Avatar for bunnyboy

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 …

Member Avatar for Clinton Portis
0
137
Member Avatar for bunnyboy

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, …

0
80
Member Avatar for bunnyboy

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 < …

Member Avatar for bunnyboy
0
4K
Member Avatar for noamco

For me, it is working with that ... [CODE=cplusplus]filestr.open( filename.c_str() );[/CODE]

Member Avatar for noamco
0
175
Member Avatar for kangarooblood
Member Avatar for Manikyr

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 …

Member Avatar for kangarooblood
1
451
Member Avatar for kangarooblood

Change [CODE=cplusplus]while( !GameOverWin );[/code] to [CODE=cplusplus]while( GameOverWin );[/code]

Member Avatar for Sky Diploma
0
230
Member Avatar for mirfan00

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 …

Member Avatar for Narue
0
198
Member Avatar for bunnyboy

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 …

Member Avatar for bunnyboy
0
112
Member Avatar for Toila

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 …

Member Avatar for WaltP
0
2K
Member Avatar for bunnyboy

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 …

Member Avatar for bunnyboy
0
118
Member Avatar for bunnyboy

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 …

Member Avatar for bunnyboy
0
161
Member Avatar for bunnyboy

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 …

Member Avatar for bunnyboy
0
114

The End.