- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 23
- Posts with Upvotes
- 18
- Upvoting Members
- 21
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Love working with .NET and ASP.NET
- Interests
- Astronomy, Going to the gym, fishing.
128 Posted Topics
Hi everyone this is my first code snippet so be gentle.. I have written a basic client/server chat program that uses multithreading for listening and sending. I welcome any improvements or discussion... Thanks James | |
Re: All your going to do is annoy people by posting things like this....you need to attempt it yourself first and show that your trying... | |
Hi, I have just started php. I have a contact form on my website and am using the is_numeric function to check that the phone number entered is a number. What I want to do is, if the phone number is not a number to output a message just underneath … | |
Re: You can't. You can't use .NET to write an extension for firefox. Although you could write an extension that runs your .NET application! | |
Re: There is no need to do all this, you are opening and closing your connection to the db twice. Instead of this, why dont you store 'isactive' in your table row depending on which button is clicked (submit or reject). DataGridItem drow = (DataGridItem)(sender as Control).Parent.Parent; RadioButton rbpApprove = (RadioButton)drow.FindControl("rbtnapprove"); … | |
Re: There are plenty, look around the internet, or buy some books. | |
| |
Re: Well first you need to d/l an adapter for SQLITE. http://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki Get the correct one for your system...get that up and running then then go here, this explains it... [Click Here](http://www.codeproject.com/Articles/22165/Using-SQLite-in-your-C-Application) | |
Re: You should add a reference to this namespace also...right click your project, click add reference and find System.Data then click add reference. | |
Re: Try running your program with administrative access. | |
Re: Create a class for Reading and one for writing, create a thread for each...this will allow you to read from and write to the socket. I posted a code snippet for this a couple of weeks back, check it out it should give you some ideas. | |
Re: To answer your first question, yes, you have an array with 5 elements. int[] Inputs = new int[5]; He is asking you to store the users numbers in the array and do your calculations on them. Then on the second step you may have a flag (boolean value) that checks … | |
Re: Hmmm, can you post your sql for updating aswell and does that work? maybe you are providing parameters in the wrong order than you are in the one above. basically your trying to fill the dataset with the wrong order of parameters? | |
Re: On line 22 you have a SqlCeDataAdapter.. System.Data.SqlServerCe.SqlCeDataAdapter da1; and on line 110 you are trying to create an instance of SqlCommandBuilder System.Data.SqlClient.SqlCommandBuilder cb; cb = new System.Data.SqlClient.SqlCommandBuilder(da1); An sql compact db is not the same as another type of db. You are trying to instansiate a SqlCommandBuilder object whilst … | |
Re: Well first you need to buy an Arduino board (obviously). You can buy a kit that will get you started from Ebay: http://www.ebay.co.uk/itm/Arduino-UNO-R3-Starter-Kit-Proto-Board-jumpers-LEDS-USB-Lead-More-/271113679029?pt=UK_Computing_Other_Computing_Networking&hash=item3f1fa270b5 (not sure if you are in the UK) The Arduino programming language is a simplified version of c/c++.. You can download the software to create and upload … | |
Ok so I am writing an entry level CV. I have no previous experience in the computing industry although I have listed personal projects I have done for others etc... My question is, for the last five years or so I have worked in a factory, not related to computing, … | |
Re: private void button1_Click(object sender, EventArgs e) { string[] arr = new string[10]; for (int i = 0; i < arr.Length; i++) { arr[i] = "String: " + i; comboBox1.Items.Add(arr[i]); } } You should bring along some of your own code to show you have at least attempted it. | |
Re: There is obviously a problem in your code...can you post it? | |
Re: I'm not sure this is possible...imagine the problems that could be caused if this was possible... As tinstaafl said, you can disable (or enable) an adapter using WMI (specifically the MSFT_NetAdapter class). [Click Here](http://msdn.microsoft.com/en-gb/library/windows/desktop/hh968170(v=vs.85).aspx) | |
Re: So you could raise the CellContentClick event on the DGV.. private void dataGridViewMain_CellContentClick(object sender, DataGridViewCellEventArgs e) { if(e.ColumnIndex == 2)//2 is whichever column your combobox is { //do something with value } } Is that what you mean or did you want to get the value of the ComboBox?? | |
![]() | Re: How have you created the DB...do you have SQL server installed...Make sure you are not trying to connect to SQL compact DB. |
Re: you mean like this? private void btn_MakeFullScreenClick(object sender, EventArgs e) { this.TopMost = true; this.FormBorderStyle = FormBorderStyle.None; this.WindowState = FormWindowState.Maximized; } You will have to have another that makes it return to normal size... private void button2_Click(object sender, EventArgs e) { this.TopMost = false; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;//(return to whatever borderstyle … | |
Re: What you should do is get the Date from the DGV cell. So lets say the user clicks on the cell with date in...you should use the CellContentClick to determine where has been clicked on the DGV. (Remember cell and column indexes are zero based) //use the cell contentclick event … | |
Re: Look in to using ASP.NET, you can create an ASP web app and do it like that.... | |
Re: Something like.. INSERT INTO DB1.TABLE1(*FIELDS*) SELECT *FIELDS* FROM DB2.TABLE2 | |
Re: I do not get an error when entering '111-11-1111' and p/w 111 I get an error when entering 222-22-2222 and p/w 222... Because you are doing string line = reader.ReadLine(); this is giving line = ""; after that you check if line is null... while (line != null) it is … | |
Re: Maybe this will help, http://stackoverflow.com/questions/823511/problem-in-reading-excel-sheet-with-special-character-in-c-sharp "Googling around suggests that this is an inherent feature of OLEDB, rather than being anything to do with Excel - it seems to simply not like periods (.) in column names." | |
I am trying to use the Sqlcecmd (command line tool for compact DB) but all it seems to do is open and close straight away... Any ideas? | |
Re: Something like this, declare an integer variable in your class int buttonsClicked = 0; Then in each click handler for each button just increment this variable, followed by a call to a function to be written a bit later... buttonsClicked++; error(); now write a simple function that will check whether … | |
Re: Not sure that would work...you could write something that would reformat their computer when they try to use your memory stick..e.g. if a correct password is not entered within 20 seconds, reformat happen...teach them not to steal?? hmmmm | |
Re: You just need to use textboxes and buttons and execute the correct code when the button is clicked. For instance when the button is clicked, open your DB, query it and place the result in a textbox. Simple way. | |
Re: Check that Form1 and Mainform are in the same namespace...it is hard to tell without seeing the class definitions. That is probably the case. | |
I wrote about this the other day but do not think I explained it too clearly...I shall try again... So my problem is this...when I am trying to allocate memory to a pointer, it fails. This is my MatrixClass definition.. class MatrixClass { public: MatrixClass(int m, int n); MatrixClass(void); virtual … | |
Hello I have this problem..I realise I am trying to I am calling function like this...a reference to E is passed in? B = D.sum1(E); MatrixClass MatrixClass::sum1(const MatrixClass &rhs) const//function to add elements of one MatrixClass to { //another and return the new MatrixClass MatrixClass C; if(this->dataptr == rhs.dataptr) { … | |
Re: Sorry, but I have enough of my own assignments to do....on the other hand...you could post parts of your code where you think you need help...then we could help without having to d/l, open and search through your code :-) | |
Re: You should download Eclipse..... http://www.eclipse.org/downloads/ Once you have done this...get the Android SDK http://developer.android.com/sdk/index.html Once you have done this open go here and install the developer tools within Eclipse and choose which API(s) you would like to work with and download. http://developer.android.com/sdk/eclipse-adt.html#installing Then just create an AVD or use your … | |
Re: I had this problem....The reason was I was passing null in when I shouldnt have been. Maybe you are doing the same? | |
I have a pointer to an array of integers... [CODE] double* three = new double[10]; for(int i = 0; i< 12;i++) { three[i] = i+1; } [/CODE] I assign i+1 to each place in 'three'...when I debug the code, I cannot see the values inside 'three' like in C#..it just … | |
I have put my code in to separate classes instead of having it just inside one class. Here is my constructor, I have also included my file which defines the class (#include "Matrix.h") [CODE] Matrix::Matrix(int* m,int* n)//constructor takes two ints { M = (*m); N = (*n); this->ptr = new … | |
Hi, I have created a new Thread in my Activity and call start on it. The run() method of the new thread runs but when I am attempting to change the UI it crashes. Because of the above I am using runOnUiThread(). [CODE] Button v = (Button) findViewById(R.id.newButton); runOnUiThread(new Runnable(){public … | |
Hello, I am trying to debug my application in real time on the emulator. At present, when I debug the application I can step through the code but cannot see any output on the emulator screen. Let's say I execute a line of code that says to set a buttons … | |
[CODE] class Matrix { public: int M; int N; double *ptr; Matrix(int m,int n)//constructor takes two ints { M = m; N = n; ptr = new double[M][N]; assign(M,N);//call function } void assign(int M,int N)// method { for(int i = 0; i < M;i++)// i is a row { for … | |
I have explicity declared my array to be 450 characters long. But for some reason when I run the program I seem to be getting about 475 characters and they are all -52(ascii) from 450 to 475. I also do not seem to have a null character in my array … | |
Re: It sounds like the instance that the value is held in is being lost as you are somewhere along the line creating new instances of that thing and the values are lost. If you could post some code it would help a lot to identify your specific problem. | |
Re: Sounds like somewhere along the line you are assigning the information to a certain point in the listview... post code if you can.... | |
[CODE] class Rectangle { private: int num; public: int method1(int,int); }classOne; int Rectangle::method1(int num1,int num2) { classOne.num = (num1 * num2); return (classOne.num); } int main() { Rectangle* one = new Rectangle(); cout << (one->method1(2,10)); NewClass* newClassPointer = new NewClass(); //I want to access NewClass here.... } [/CODE] [CODE] NewClass::NewClass() … | |
[CODE] #include <iostream> #include <fstream> #include <string> using namespace std; int main() { oneclass.hello(); return 0; } class one { private: int num; public: void hello(); }oneclass; void one::hello() { num++; cout << num; } [/CODE] Could anybody please please tell me what is wrong with this code. I think … | |
Re: And what compiler are you using exactly. I have not long started learning C++, but I did not think variable length arrays were valid C++? |
The End.