2,245 Posted Topics
Re: 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. … | |
Re: 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 … | |
Re: 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. | |
Re: 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() { } … | |
Re: 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 … | |
Re: 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...? | |
Re: 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 … | |
Re: 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] | |
![]() | Re: 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 … ![]() |
Re: 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] | |
Re: 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 … | |
Re: 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 … | |
Re: 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(); … | |
Re: 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. | |
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; 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) || … | |
Re: 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 … | |
Re: 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 … | |
Re: >> 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 @ … | |
Re: 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 … | |
Re: 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, … | |
Re: Line 21 of your original post is missing a `: [code] FLAG=`sqlplus -silent viewer/viewer@ltstprod << SQLEND >> ${L2S_RUN_LOG_FILE} [/code] | |
Re: 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 … | |
Re: Can't you just pull the row index off of the current cell with [icode]dataGridView1.CurrentCell.RowIndex[/icode]? | |
Re: 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]. | |
Re: 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 … | |
Re: [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(); } … | |
Re: 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); … | |
Re: Out of curiosity what task are you trying to perform when you log in? | |
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; 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 = … | |
Re: Why do you care about the file extension? Most people care about the functionality. What are you trying to do? | |
Re: 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(); } … | |
Re: Use Latex or MimeTex to get a math representation of an equation and display the resulting image | |
Re: 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] … | |
Re: [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') … | |
Re: 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 … | |
Re: 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 … | |
Re: Use a custom validator and validate it in code based on the postback button. | |
Re: 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. | |
Re: 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 … | |
Re: 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 … | |
Re: 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? | |
Re: 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 … | |
Re: 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. | |
Re: >>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 … | |
Re: 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 | |
Re: 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 … | |
Re: 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] … | |
Re: 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 … | |
Re: [URL="http://www.codefixer.com/asp-net/tutorials/using-master-pages-with-css.asp"]Master Pages with CSS[/URL] | |
Re: 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] |
The End.