[Solved] Issue validating user credentials in custom authentication form [closed]

I can only hazard a guess at what you are asking, but if you want the username and password to both be correct before showing the form use this instead if (tbUsername.Text == “username”) { if(tbPassword.Text == “password”) { AdminMainMenu x = new AdminMainMenu(); x.Show(); t.Play(); this.Dispose(); } else { MessageBox.Show(“Wrong password”, “Error”); } } … Read more

[Solved] How simulate a key event with GDK? [closed]

I would guess that you can use e.g. gdk_display_put_event(), but your question is not very clear. Do you expect other applications than your own to see the emulated keyboard events? Not sure GDK can do that. solved How simulate a key event with GDK? [closed]

[Solved] display function not displaying data [closed]

I think you started in the wrong way: your node structure contains pointer to a pointer. struct node { string info; struct node **next; }; that might be the reason the code does not make sense. You can use (and generally you do things this way) a simple pointer: struct node { string info; struct … Read more

[Solved] C++ generate 25 digit random number?

Declare an array of twenty-six characters. In a loop from zero to twenty-four (inclusive) generate a random value between ‘0’ and ‘9’, and add to the array. Terminate the array with the string terminator. Now you have a string with 25 random decimal digits. For the actual random-number generation, I suggest you look into the … Read more

[Solved] What’s the problems on this sql command code? [closed]

Introduction This question is about a SQL command code and the problems associated with it. SQL is a powerful language used to query and manipulate data in databases. It is important to understand the syntax and structure of SQL commands in order to ensure that the code is written correctly and that the desired results … Read more

[Solved] What’s the problems on this sql command code? [closed]

It looks a bit bulky, I’d recommend you to rewrite it in the following way: SELECT User1.NAME,User1.PORT,User1.IP,File1.SIZE, FROM [User_File],[User1],[File1] WHERE [User_File].UID= User1.UID AND [User_File].FID=File1.FID and [User_File].FID = {0} and check if it runs without errors from your SQL Management Studio. solved What’s the problems on this sql command code? [closed]

[Solved] strtok not working as expected

strtok is working exactly as expected. It breaks the input apart into the strings 123 and 456. strtok (tempRead, ” “); /* Returns 123 */ strtok (NULL, ” “); /* Returns 456 */ I think you can do with a simpler solution: int i = 0; char tempRead[30]; … while (tempRead[i] == ‘ ‘ && … Read more

[Solved] C Programming: How do I insert a number into an array such that each digit of the number goes into each field of the array? [closed]

#include <stdio.h> #define MAX_NUMS 5 // change me to 1000 int main(int argc, const char * argv[]) { char numberString[ MAX_NUMS + 1 ]; int numberNumeric [ MAX_NUMS ]; printf(“Enter number “); scanf(“%s”,numberString); for ( int i=0; i < MAX_NUMS; ++i) { printf(“converting %c\n”,numberString[i]); numberNumeric[i] = (numberString[i] – 0x30); // convert ascii to integer } … Read more

[Solved] trying to write a program to undersatnd pre & post increments and unary operators

This little program shows how pre and post increments works. class Program { static void Main(string[] args) { Console.WriteLine(“After pre {0}”, PreInc()); Console.WriteLine(); Console.WriteLine(“After post {0}”, PostInc()); Console.ReadLine(); } public static int PreInc() { int a = 0; do { Console.WriteLine(“PreIncrement value of a is {0}”, ++a); } while (a < 10); return a; } … Read more

[Solved] How to insert byte[] array with ORMlite into image column

In ServiceStack.OrmLite v4, as specified by mythz in the comments, everything should work as-is. In v3, if you want to have byte arrays serialized as binary instead of base 64 strings, you should inherit from SqliteOrmLiteDialectProvider and override the functions responsible for converting CLR values from and to SQL values to handle byte arrays. public … Read more