2,245 Posted Topics

Member Avatar for want_to_code
Member Avatar for sparksterz

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?

Member Avatar for sparksterz
0
143
Member Avatar for karpaklu

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 …

Member Avatar for cfajohnson
0
86
Member Avatar for bords

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?

Member Avatar for avirag
0
297
Member Avatar for pauloselhombre

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.

Member Avatar for pauloselhombre
0
133
Member Avatar for farsen

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?

Member Avatar for farsen
0
93
Member Avatar for Nattynooster

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 …

Member Avatar for sknake
0
431
Member Avatar for The Dude

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!

Member Avatar for Wasser
0
168
Member Avatar for naush83
Member Avatar for naush83
0
191
Member Avatar for Darth Vader
Member Avatar for xfrolox

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 …

Member Avatar for xfrolox
0
4K
Member Avatar for RunTimeError

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

Member Avatar for sknake
0
111
Member Avatar for pilipino93

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

Member Avatar for sknake
0
892
Member Avatar for PysKo
Member Avatar for allenmico
0
152
Member Avatar for VidyaYadav
Member Avatar for sanch01r
0
1K
Member Avatar for Ritushido

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]'

Member Avatar for sknake
0
150
Member Avatar for Yovanys

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]

Member Avatar for scarpacci
0
200
Member Avatar for Spycat

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

Member Avatar for Spycat
0
187
Member Avatar for JRabbit2307

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]

Member Avatar for sknake
0
99
Member Avatar for michael123

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

Member Avatar for sknake
0
130
Member Avatar for Abhishek_Boga

I don't understand what you're trying to accomplish. Can you explain the situation a little more?

Member Avatar for sknake
0
187
Member Avatar for eng shimaa
Member Avatar for cgyrob

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?

Member Avatar for cgyrob
0
112
Member Avatar for Wiizl

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 …

Member Avatar for Wiizl
0
142
Member Avatar for jonahmano

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

Member Avatar for sknake
-2
140
Member Avatar for nirveshverma

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.

Member Avatar for sknake
-1
181
Member Avatar for vuyiswamb

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

Member Avatar for sknake
0
83
Member Avatar for kool.net

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 …

Member Avatar for sknake
0
101
Member Avatar for vinnijain

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.

Member Avatar for sknake
0
92
Member Avatar for jasperjerome

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 …

Member Avatar for kool.net
0
181
Member Avatar for f_atencia

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.

Member Avatar for prashantpani
0
133
Member Avatar for VernonDozier

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.

Member Avatar for jbennet
1
646
Member Avatar for Diamonddrake

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

Member Avatar for scorpion54
0
303
Member Avatar for cguan_77
Member Avatar for PyroPaul2

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 :)

Member Avatar for PyroPaul2
1
356
Member Avatar for Mongz

What database are you using? There are different mechanisms to back up MSSQL versus MS Acess for example.

Member Avatar for shankarkotagiri
0
110
Member Avatar for jen140

I don't understand the question. There aren't any problems with iptables, you can port forward with it.

Member Avatar for jen140
0
622
Member Avatar for freddyfly

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?

Member Avatar for sknake
0
1K
Member Avatar for JohnAvo

[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.

Member Avatar for edenCC
0
88
Member Avatar for decentsimple

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

Member Avatar for decentsimple
0
328
Member Avatar for john_beginner

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.

Member Avatar for john_beginner
0
366
Member Avatar for vinnijain

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

Member Avatar for vinnijain
0
337
Member Avatar for riyaza

Usually the database supports incremental numbering natively. What database are you using?

Member Avatar for Drlionheart
0
162
Member Avatar for vinnijain

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 …

Member Avatar for vinnijain
0
3K
Member Avatar for yamid

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

Member Avatar for sknake
0
756
Member Avatar for Dazaa

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.

Member Avatar for sknake
0
322
Member Avatar for karthikvcsharp

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

Member Avatar for binta4m
0
105
Member Avatar for ShailaMohite

UNC paths typically have a double backslash in front of them: [icode]\\hostname\share\file[/icode]. Give that a shot.

Member Avatar for sknake
0
126
Member Avatar for sijothomas

You could try something like this too: [code] private void button1_Click(object sender, EventArgs e) { this.WindowState = FormWindowState.Maximized; } [/code]

Member Avatar for vinnijain
0
98
Member Avatar for laghaterohan

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.

Member Avatar for sknake
0
97

The End.