2,245 Posted Topics
Re: That code won't compile and i'm not aware of where you are getting the property [icode]fsPos[/icode] from. Could you post a version of the code I can compile? | |
Re: You should probably use [icode]find[/icode]: [code] #!/bin/bash echo -n "Enter a directory: " read dir if ! test -d ${dir}; then echo "Directory does not exist" exit fi # To search child directories rm -f output_withchildren.dat find ${dir} -type f -iname a\* >> output_withchildren.dat # To not search child directories … | |
Re: Is your "Current form" the main form of your application or is it another form? And do you want to dispose the form or hide it? | |
Re: Please use code tags when posting code on daniweb: [noparse] [code] ...code here... [/code] [/noparse] The code path depends on the inputs you are providing. Please provide the age/weight you are using. | |
Re: Do you have a video controller embedded on a form, and you want the controls on top of the Z-Order? Or is this supposed to be on top of windows media player? | |
Re: Here is another way: [code] Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim act As Action(Of Integer) = AddressOf ShowMessageBoxAfter act.BeginInvoke(30, Nothing, Nothing) 'Waits 30 seconds End Sub Private Sub ShowMessageBoxAfter(ByVal sleep As Integer) System.Threading.Thread.Sleep(sleep * 1000) MessageBox.Show("Hi") End Sub [/code] That calls the thread.sleep … | |
Re: 2/3 :( I don't know how to count apples it seems. I was looking out for some kind of trick-question when it came to the apples because I read William's post but a lot of good that did me, I still missed it! | |
Re: Have you tried sending an HTTP 401 to prompt for credentials? That should invoke the dialog client side. | |
Re: Try this: [code] Color savedColor = textEdit1.BackColor; [/code] | |
Re: You can call [icode]Console.Beep()[/icode] to make the computer beep. This will use the internal speaker of the computer. If you want to play a custom sound you will need to use the computer's external speaker. To play a WAV file user the [icode]SoundPlayer[/icode] class: [code=c#] private void button2_Click(object sender, EventArgs … | |
Re: This should do the trick: [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Drawing.Design; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.Drawing.Text; using System.IO; namespace daniweb.images { public partial class Form1 : Form { private List<Bitmap> special; private List<Bitmap> stub; private List<LoginImage[]> … | |
Re: [icode]File.Create()[/icode] returns an open file stream to the file. So in this case your call to [icode]File.Create[/icode] creates the file and opens it then you're attempting to open it with a second filestream which results in the error. The filestream overload can create the file for you -- so it … | |
Re: I would highly recommend using XML Serialization. INI is going back in time :( | |
Re: Try: [code] if (dataGridView1.Rows[j].Cells[1].Value == DBNull.Value) [/code] | |
Re: You should [b]never[/b] allow user input to be used inside of the command text of an SQL Statement. [b]Always use parameterized SQL[/b]. See '[URL="http://msdn.microsoft.com/en-us/library/z72eefad.aspx"]Using parameters with an SqlDataSource[/URL]' | |
Re: How many rows are you transferring, and do you have a unique identifier for the rows? You could [icode]Select * From Table[/icode] and then on the access side test if the unqiue identifier exists. If it doesn't exist then [icode]Insert Into Table () Values ()[/icode] | |
Re: Search engine crawlers come across this page and it increases the view count. They also periodically check back hourly, daily, weekly, etc depending on how often the page is updated. It is likely that only a handful of the 350 people were human | |
Re: try this: [code] Dim guess As String = "" Do Until guess = "BMW" Console.WriteLine("Name your favorite make of automobile") guess = Console.ReadLine() If guess <> "BMW" Then Console.WriteLine("Sorry wrong answer hint: This make of car is made in Germany.") Console.WriteLine() End If Loop [/code] | |
Re: Try this: [code] IF OBJECT_ID('tempdb..#Test', 'U') IS NOT NULL DROP TABLE #TEST Create Table #Test ( RecordId int identity(1000, 1) PRIMARY KEY, Value varchar(100) ) SET NOCOUNT ON Insert Into #Test (Value) Values ('cse-12m') Insert Into #Test (Value) Values ('cse-343k') Insert Into #Test (Value) Values ('cse-mka') Insert Into #Test (Value) … | |
Re: I don't understand what you're trying to accomplish. Can you explain the situation a little more? | |
Re: Are the indexes the same for both fields? IE is the member number in item#5 also the members name in the other dropdownlist as item #5? | |
Re: You need to name the table alias in your sub select. This will fail: [code=sql] Select Count(*) From (Select * From sysobjects) [/code] This will work: [code] Select Count(*) From (Select * From sysobjects) [COLOR="Red"]as tbl[/COLOR] [/code] Just stick an "as tblName" clause regardless of whether you use it. In … | |
Re: No, ddanbe is correct. If you use [icode]Console.Write()[/icode] then read the line it will not advance the cursor to the next line. You probably made modifications to the wrong section of the code. Here are the lines in question: [code] Console.WriteLine ("Enter the Name:"); Console.WriteLine ("Enter the Roll No.:"); [/code] … | |
Re: You could also use the asynchronous methods of the sockets to accomplish this: [code] socket.BeginConnect(); socket.BeginSend(); [/code] An extensive implementation of using asynchronous TCP/IP sockets and the thread pool was given in this thread: [url]http://www.daniweb.com/forums/thread228973.html[/url] You could modify that application to send string messages instead of files. | |
Re: You could do something like this with your query: [code=sql] Select * From Table Order By (Case When Parent Is Not Null Then Parent Else NodeId), NodeId [/code] You need to handle [icode]DBNull.Value[/icode] in your C# application. You cannot convert a database null value to int 32. [code=c#] if (row["Parent"] … | |
Re: You DTS or the Import/Export data wizard on SQL Server 2008 to copy the data. You should be able to set up an ODBC data source to connect to your MySQL database then let SQL Server handle the rest. The table structures will be rough and unindexed so you should … | |
Re: Can you upload your application? Those two errors appear to be 2 unqiue error types, not a single cause. One obviously is running out of memory and I don't know what the cause of the second one is off hand. | |
Re: Odd database design but you could do something like: [code] IF OBJECT_ID('Kids_Test', 'U') IS NOT NULL DROP TABLE Kids_Test IF OBJECT_ID('Votes_Test', 'U') IS NOT NULL DROP TABLE Votes_Test GO CREATE TABLE Kids_Test ( KidID int identity(1000, 1) PRIMARY KEY, ParentId int, PhotoFile varchar(25) ) CREATE TABLE Votes_Test ( NameId int … | |
Re: I believe your column datatype in the SQL Database in an "DateTime", correct? If so then use sudharani's code except change the SqlDbType over to a DateTime instead of nchar. | |
Re: I really like the idea of the dropdown where you can select a rep amount to give/take which I believe was mentioned in AD's original thread about negative rep. | |
Re: >>I have downloaded examples in C# 2 of them, the first one is WAY too complicated as its written to control a particular game controller and the other just has errors in it where it parses the data wrong A game controller with a blood pressure monitor? I'm lost. As … | |
| |
Re: Just send it as binary data like you would anything else -- but the question is *how* are you going about handling IPC? Are you using WM_COPYDATA, named pipes, etc? I like named pipes :) | |
Re: What database are you using? There are different mechanisms to back up MSSQL versus MS Acess for example. | |
Re: I don't understand the question. There aren't any problems with iptables, you can port forward with it. | |
Re: Since this is more of a parent:child relationship would it be acceptable to have a second grid that would list the swimmer's times when you chose a name in the main grid? | |
Re: [icode]apt-get install ntp[/icode] will install a full ntp daemon or [icode]apt-get install ntpdate[/icode] will install a lighter client-only tool. | |
Re: >> how should i code or let that site know that my system is coming from this domain? This is determined by the IP address of the machine making the outbound connection. Check out [URL="http://www.whatismyip.com"]what is my ip[/URL] | |
Re: Make a static variable with your connection string and set it from the windows form or ASP.NET web app when the code initializes and use that. You don't need to construct it every time. | |
Re: You don't necessarily want a regex for that.... it will likely get a little too complicated. [code] private static char[] GetChars() { List<char> lst = new List<char>(); lst.Add('π'); lst.Add('θ'); lst.Add('α'); lst.Add('β'); lst.Add('γ'); lst.Add('°'); lst.Add('+'); lst.Add('-'); lst.Add(','); lst.Add('×'); lst.Add('÷'); lst.Add('√'); lst.Add(','); for (int i1 = (int)'a'; i1 < (int)'z'; i1++) lst.Add((char)i1); … | |
Re: Usually the database supports incremental numbering natively. What database are you using? | |
Re: This will block a double space, ie: "a<space><space>b" but allow "a<space>b<space>c": [code] private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { TextBox tb = (TextBox)sender; if ((e.KeyChar == ' ') && (tb.Text.Length > 0)) { if (tb.Text[tb.Text.Length - 1] == ' ') e.Handled = true; } } [/code] To allow only a … | |
Re: [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace daniweb { public partial class frmDoubleRead : Form { public frmDoubleRead() { InitializeComponent(); } private static string[] GetTestData() { List<string> result = new List<string>(); result.Add("Permeability"); result.Add("/"); result.Add("1 2 3 4"); result.Add("5 6 … | |
Re: The windows host file is located in [icode]%systemroot%\system32\drivers\etc[/icode] which translates to [icode]C:\WINDOWS\system32\drivers\etc\hosts[/icode] on 32bit versions of windows. | |
Re: [code] private static byte[] GetImage() { byte[] result = null; const string query = @"Select Top 1 Picture From Picture"; using (SqlConnection conn = new SqlConnection(BuildSqlNativeConnStr("apex2006sql", "Bugs"))) { conn.Open(); using (SqlCommand cmd = new SqlCommand(query, conn)) { using (SqlDataReader dr = cmd.ExecuteReader()) { using (DataTable dt = new DataTable()) { … | |
Re: UNC paths typically have a double backslash in front of them: [icode]\\hostname\share\file[/icode]. Give that a shot. | |
Re: You could try something like this too: [code] private void button1_Click(object sender, EventArgs e) { this.WindowState = FormWindowState.Maximized; } [/code] | |
Re: I think you will want to use UTF-16 for languages with other characters in them. I'm not an encoding expert but UTF16 has more allowed character values than UTF8. |
The End.