2,245 Posted Topics

Member Avatar for Diamonddrake

There are two ways of going about this too. FTP as an example implements both. FTP Active -- You connect to the FTP on :21 and have a "command" session. When you request a file download or send it opens up another port and sends that information to the client. …

Member Avatar for sknake
0
4K
Member Avatar for mr_scooby

What database are you using? [code] CREATE TABLE [COLOR="red"]User [/COLOR]( -- reserved word userEmailAddress varChar(255) not null PRIMARY KEY, userFirstName varChar(100) not null, userLastName varChar(100), userStatus varChar(1) not null, userNickName varChar(40), userMifrenzPassword varChar(10) not null, UserEmailPassword varChar(10) not null, userDOB [COLOR="Red"]date[/COLOR] -- There is no "date" datatype ) CREATE TABLE …

Member Avatar for mr_scooby
0
101
Member Avatar for Diamonddrake

You can use [URL="http://www.dyndns.com/services/dns/dyndns/ddns.html"]DynDNS[/URL]. Basically you run a client on a machine on the dynamic-ip-address-network and that client updates DynDNS with your dynamic IP and they update the host entry. So you could get a host like "DdoubleD.dyndns.com" that always resolves to your dynamic ip address.

Member Avatar for Diamonddrake
0
243
Member Avatar for Daiosmith

Random is time-seeded. Use the [icode]RNGCryptoServiceProvider[/icode]: [code] using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace daniweb { public class Coin { private Side _lastRoll; public Side LastRoll { get { return _lastRoll; } } public enum Side { Heads = 0, Tails = 1 } public Coin() { } …

Member Avatar for Rashakil Fol
0
297
Member Avatar for azegurb

Does your network adapter in SuSE works, ie can you connect to out a site from your linux install? Have you configured SSHD to listen? What is the fatal error? Have you checked your log files? The first step would be to check if you linux box can hit a …

Member Avatar for sknake
0
155
Member Avatar for farsen

That depends on what type of underlying objects they are. If you don't implement IComparable then I believe the CLR compares the return value of [icode].GetHasCode()[/icode]. Why not just implement IComparable...?

Member Avatar for farsen
0
193
Member Avatar for serkan sendur

I'm doubt Microsoft uses them extensively for internal applications, but i'm sure they have just about every OS installed in their corporate headquarters because they need to know what they are competing with. Microsoft doesn't really have a solution for high-load DNS servers and routers, and Microsoft farms their DNS …

Member Avatar for zcat
0
284
Member Avatar for siddhesh123

You need to call Invoke on the control. Use this method to set the picture from another thread: [code] private void SetPicture(Image img) { if (pictureBox1.InvokeRequired) { pictureBox1.Invoke(new MethodInvoker( delegate() { pictureBox1.Image = img; })); } else { pictureBox1.Image = img; } } [/code]

Member Avatar for sknake
0
9K
Member Avatar for iamthwee

What do you mean "The funny thing is the pid says it is running on boot"? Scripts in init.d must be referenced from their run levels. Depending on your distro you should have a command for [icode]update-rc.d[/icode] to specify the run levels to execute the scripts. Also the symlink naming …

Member Avatar for iamthwee
0
207
Member Avatar for yorro

The Visual Studio IDE uses reflection to render user controls so it is compiling and loading the control which runs the code in the constructur and user control's load event. Take a look at this article on detecting if the code is being run from a designer: [url]http://vidmar.net/weblog/archive/2005/04/11/1246.aspx[/url]

Member Avatar for yorro
0
91
Member Avatar for sakhi kul

Why don't you post the code where you are using the data reader? On the first iteration you need to add the "@opt1" variable to the SqlCommand, and on subsequent iterations you need to .Clear() the parameters, and re-add "@opt1" You could also reference the parameter by name to change …

Member Avatar for sknake
0
61
Member Avatar for avirag

I'm afraid I don't understand what you're asking or why that makes sense. Why not just show a thumbnail of the form's screenshot, ie letting them preview the form? You could open up a 'preview' form when they mouseover the image that way they could see a bigger version of …

Member Avatar for avirag
0
298
Member Avatar for ejazmusavi

I actually have a sample project here that does that. [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.dgv { public partial class frmDataGridView5 : Form { private DataTable dt; private DGVColumnHeader colHead; private bool suspendEvents; public frmDataGridView5() { InitializeComponent(); …

Member Avatar for sknake
0
370
Member Avatar for blindkilla

Can you post the example code and URL demonstrating this behavior? A lot of the times when you see "Processing..." the page is waiting for something to happen then sending a redirect to another URL with client-side code that the [icode]HttpWebRequest[/icode] does not understand.

Member Avatar for sknake
0
86
Member Avatar for zorrinn

[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.Net; namespace daniweb { public partial class frmIP : Form { public frmIP() { InitializeComponent(); } private static IPAddress[] GetList(string IP) { if (string.IsNullOrEmpty(IP)) throw new ArgumentNullException("IP"); if ((IP.Length < 4) || …

Member Avatar for sknake
-1
431
Member Avatar for farsen

Just use TCP and forget about broadcast information. Don't implement something of your own, use TCP ;) For clients connecting to you from the WAN they initiate the connection so you need a port forwarding rule set up on your edge device to route inbound connections to the server from …

Member Avatar for farsen
0
110
Member Avatar for EvilLinux

Why not use XML serialization of the class? Mock up student & grade classes: [code] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Serialization; using System.IO; namespace daniweb { public class Student { private string _firstName; private string _lastName; private List<Grade> _grades; public string FirstName { get { return …

Member Avatar for EvilLinux
0
1K
Member Avatar for avirag

>> well I can tell you Google didn't write it. they based their entire empire on something they paid for with petty pocket change. Are you sure about that? As far as I know Larry Page and Segey Brin wrote the algorithm known as "Page Rank" while they were @ …

Member Avatar for Diamonddrake
4
149
Member Avatar for jonnytabpni

You can create a named pipe for LPT1 or which ever port the printer is on and send it data: [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.IO; using System.Management; using System.Net; using System.Reflection; using System.Runtime.InteropServices; using System.Windows.Forms; using Microsoft.SqlServer.Management.Smo; using Microsoft.SqlServer.Management.Smo.RegisteredServers; using Microsoft.Win32; using …

Member Avatar for sknake
0
862
Member Avatar for sakhi kul

I can't see what you're doing wrong. I did the same thing and it works as expected: [code=sql] IF OBJECT_ID('sp_Test', 'P') IS NOT NULL DROP PROCEDURE sp_Test GO CREATE PROCEDURE sp_Test ( @id int ) AS BEGIN Select * From sysobjects END [/code] [code=vb.net] Private Sub Button2_Click(ByVal sender As System.Object, …

Member Avatar for sakhi kul
0
85
Member Avatar for naziatarannum

Line 21 of your original post is missing a `: [code] FLAG=`sqlplus -silent viewer/viewer@ltstprod << SQLEND >> ${L2S_RUN_LOG_FILE} [/code]

Member Avatar for naziatarannum
0
772
Member Avatar for benkyma

You can get all that information in one pass: [code] Select Title, Count(*) As Cnt From poss_titles Group By Title Order By Title [/code] Here is one way you can store it. This is really only beneficial if you are looking up based on the _exact_ title match: [code=c#] using …

Member Avatar for benkyma
0
321
Member Avatar for Anupama G

Can't you just pull the row index off of the current cell with [icode]dataGridView1.CurrentCell.RowIndex[/icode]?

Member Avatar for sknake
0
62
Member Avatar for dhaval_shah

Upload a sample project demonstrating this behavior. You can upload a project by clicking on "Go Advanced" and then "Manager Attachments". You need to implement [icode]IEnumerable[/icode] to use [icode]foreach()[/icode].

Member Avatar for dhaval_shah
0
175
Member Avatar for snakay

I create a wrapped class for data access. I usually just load all of the results in DataTable since I don't bring back 1,000,000 records and i'm not concerned with memory management. Here is a partial post but it shows how I go about it. This wraps all data access …

Member Avatar for snakay
-1
198
Member Avatar for Nishara

[code] private static int DeleteRecord(string ID) { const string connStr = @"Data Source=apex2006sql;Initial Catalog=Leather;Integrated Security=True;"; const string query = "Delete From UserTable Where ID = @ID"; using (SqlConnection conn = new SqlConnection(connStr)) { conn.Open(); using (SqlCommand cmd = new SqlCommand(query, conn)) { cmd.Parameters.Add(new SqlParameter("@ID", SqlDbType.VarChar)).Value = ID; return cmd.ExecuteNonQuery(); } …

Member Avatar for sknake
0
99
Member Avatar for 666kennedy

Here is a similar example: [code=c#] private void StopWatcher() { if (_fsWatcher != null) { try { _fsWatcher.EnableRaisingEvents = false; _fsWatcher.Dispose(); _fsWatcher = null; } catch { } } } /* -------------------------------------------------------------------- */ private void StartWatcher(string ExeConfig) { StopWatcher(); FileSystemWatcher _fsWatcher = new FileSystemWatcher(); _fsWatcher.Path = Path.GetDirectoryName(ExeConfig); _fsWatcher.Filter = Path.GetFileName(ExeConfig); …

Member Avatar for DdoubleD
0
141
Member Avatar for minigweek
Member Avatar for summey

[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.Net; using System.Web; using System.IO; namespace daniweb { public partial class frmProxy : Form { public frmProxy() { InitializeComponent(); } private bool useProxy; private void button1_Click(object sender, EventArgs e) { useProxy = …

Member Avatar for summey
0
94
Member Avatar for arya sharma

Why do you care about the file extension? Most people care about the functionality. What are you trying to do?

Member Avatar for Ramesh S
-1
66
Member Avatar for farsen

Maybe the delegate never finishes running.... Have you debugged it? This works: [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.Runtime.Remoting.Messaging; namespace daniweb { public partial class frmAsync : Form { private delegate string Delegate(); public frmAsync() { InitializeComponent(); } …

Member Avatar for farsen
0
367
Member Avatar for avirag

Use Latex or MimeTex to get a math representation of an equation and display the resulting image

Member Avatar for DdoubleD
0
112
Member Avatar for ashu2409

Post the contents of the stored procedure you using, and the CREATE TABLE statement of all tables involved. It needs to have all of the constraints and indexes on the table. This is an MSSQL question and not an ASP.NET question. These questions should be posted to the [URL="http://www.daniweb.com/forums/forum127.html"]MS SQL[/URL] …

Member Avatar for ashu2409
0
989
Member Avatar for sushant17284

[code=sql] IF OBJECT_ID('BookTest', 'U') IS NOT NULL DROP Table BookTest IF OBJECT_ID('TxnTest', 'U') IS NOT NULL DROP Table TxnTest GO CREATE TABLE BookTest ( book_id int, book_title varchar(3), book_author varchar(3) ) Create Table TxnTest ( transaction_id int, book_id int, transaction_date varchar(10) ) GO Insert Into BookTest Values (1, 'Abc', 'Xyz') …

Member Avatar for sknake
0
114
Member Avatar for SoftwareMatters

Just take the echo out of the command: [code=bash] sk@svn:/tmp/tif$ touch 1.tif 2.TiF 3.TIF sk@svn:/tmp/tif$ find ./ -type f -iname \*.tif -exec echo gdaladdo -r average \"{}\" 2 4 8 16 32 \; gdaladdo -r average "./2.TiF" 2 4 8 16 32 gdaladdo -r average "./1.tif" 2 4 8 16 …

Member Avatar for sknake
0
100
Member Avatar for mr_scooby

The UNION ALL isn't really buying you much so I don't see the need to do it that way. Just use a transaction and do the insert: [code=sql] IF OBJECT_ID('Test', 'U') IS NOT NULL DROP TABLE Test Create Table Test ( UserName varchar(30) ) GO BEGIN TRANSACTION Insert Into Test …

Member Avatar for sknake
0
2K
Member Avatar for facadie
Member Avatar for CJG87

How is that variable declared in the assembly? A static or const value? Is it a member of the class? You need to reflect in to the assembly.

Member Avatar for sknake
0
149
Member Avatar for avirag

Try something like this. [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.paging { public partial class Form1 : Form { private const int RECORDS_PER_PAGE = 10; private List<string> lstAllLinks; private List<string> currentSearchResults; private int curPage; private int maxPage; public …

Member Avatar for avirag
0
146
Member Avatar for 999cm999

If you're looking to move up in the business environment I would take the hit on time and go to the local college. At my company we disregard certs altogether and put more emphasis on the degree, work ethics, and commitment of the indivual applying. We're a smaller company so …

Member Avatar for michael.peter77
0
190
Member Avatar for Vampdee

Vampdee, You need the source code for the website -- not the code where the website has been deployed. Do you have a bunch of source files or *.dll files in the project?

Member Avatar for vuyiswamb
0
146
Member Avatar for sijothomas

Use the [icode]SmtpClient[/icode] and [icode]MailMessage[/icode] classes: [code] public static SmtpClient GetSmtpClient() { SmtpClient smtp = new SmtpClient("smtp.server.com"); if (WebConfigurationVariables.SMTPUseAuth) { smtp.Credentials = new NetworkCredential("username", "password"); } return smtp; } protected void ButtonSubmit_Click(object sender, EventArgs e) { if (IsValid) { List<string> Sql = new List<string>(); Sql.Add("Message:"); Sql.Add(TextBoxMessage.Text); try { SmtpClient smtp …

Member Avatar for sknake
0
89
Member Avatar for Link82

Can you upload an excel spreadsheet with enough test data to reproduce the issue? I'm afraid i'm not following your description. It gets a little confusing with three tables and not seeing the structure or data.

Member Avatar for sknake
0
162
Member Avatar for unixanalyst

>>I would like to look at restricting our external DNS servers to only respond for the domains that we own. Firstly, I would like to ask if this is the convention, or does everybody set their DNS to answer all queries for everyone? Typically you allow all queries for domain …

Member Avatar for sknake
0
384
Member Avatar for fayola

Have you checked the event logs of your server? Is the client receiving an error message? I think the event logs would be the best place to start. Let me know what you find

Member Avatar for sknake
0
98
Member Avatar for didyouthink76

Trace where the connection is coming from using the SQL Server Profiler. [quote] Start->Programs->MS SQL Server 2005->Performance Tools->Profiler. you will want to trace the login Failed Event. You can remove any others, as they will just be noise for this. [/quote] [quote] File - New Trace Connected with Windows Authentication …

Member Avatar for sknake
0
131
Member Avatar for bmiles2001

Why do your update and delete statements have different where clauses? Shouldn't they be the same? [code] UpdateCommand="UPDATE messenger SET studentID = ?studentID, message = ?message [COLOR="Red"]WHERE (id = ?id)[/COLOR]" DeleteCommand="DELETE FROM messenger [COLOR="red"]WHERE id = ?id AND studentID = ?studentID AND message = ?message AND department = ?department" [/COLOR] …

Member Avatar for bmiles2001
0
550
Member Avatar for unixanalyst

How are you using tcpdump to measure traffic? And if you're doing the recursive lookups then you don't benefit from upstream DNS doing it. You should have a recursive server in front of you that you could send all of your lookups to instead of doing them yourself, unless you …

Member Avatar for unixanalyst
0
345
Member Avatar for cavpollo

[URL="http://www.codefixer.com/asp-net/tutorials/using-master-pages-with-css.asp"]Master Pages with CSS[/URL]

Member Avatar for cavpollo
0
1K
Member Avatar for Kruptein
Re: sed

Forgetting to give the filename to sed: [code] for filename in /home/darragh/public_html/test/* do sed -i 's/..\/config/.\/config/g' ${filename} done; [/code]

Member Avatar for sknake
-1
125

The End.