2,245 Posted Topics
Re: Ehhhh this is a very bad way to go about calculating progress. You should not estimate the product of any work based on the download time required except the download itself. If your internet connection is slow or the webserver is a little slower than usual then it will take … | |
Re: If you're inheriting between two forms you're not passing data but rather you are sharing it. You need to mark members in the form as "protected" instead of "private" so you can access them in your inherited form. Upload a sample project with your forms and describe the desired behavior … | |
Re: In the case of the example you gave they are using URL rewriting as you have discovered. Google "ASP.NET URL Rewriting" for articles on [b]many[/b] ways to go about it. I believe you can get plugins for rewriting and I think the latest version(s) of IIS support it natively. Here … | |
Re: That isn't a valid URL so it is up to the browser on how to handle it. Most browsers have a "default search provider" that will take invalid strings entered in the address bar and submit them to the search provider as a search query. That being said you should … | |
Re: You could also take an approach like this to avoid a huge switch statement: [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 frmDynamicBtn : Form { private Dictionary<string, ButtonPair> dict; public frmDynamicBtn() { InitializeComponent(); } … | |
Re: >>- The folks running the website have some bugs in there scripts/server Sounds like an issue on their end. Unfortunately without being able to reproduce the problem its almost impossible to give you advice. Are you willing to share the URL? | |
Re: I don't understand the question but I suppose you could query active directory in a domain environment. | |
Re: Upload a sample project demonstrating the behavior | |
Re: That exception is a validation error. You need to provide the XML file. [noparse] [code=text] ...xml here... [/code] [/noparse] | |
Re: [QUOTE=Damon88;1059239]I am writing a application where i need to know which games are installed on a system. [/QUOTE] [QUOTE=Damon88;1059361]1. Method 1 looks in registry, but you know there is a fair chance that registry might not exist , (reason : window reinstalled) [/QUOTE] Method 1 of checking the registry is … | |
Re: Just the select query: [code=sql] Select * From #Table Where [Date] >= Cast(Floor(Cast(GetDate() as float)) as DateTime) [/code] A full example: [code=sql] IF OBJECT_ID('tempdb..#Table', 'U') IS NOT NULL DROP TABLE #Table Create Table #Table ( [Date] DateTime, EventName varchar(100) ) Insert Into #Table ([Date], EventName) Values (GetDate()-3, 'Event 1') Insert … | |
Re: I ship MSDE / SQL Express with a few of my applications but as adatapost mentioned you should have two installers -- a lighweight application for just your software and another with your software and MSSQL. Depending on how complicated you want to make your life you could have the … | |
Re: You should not be querying an SQL server in the constructor of a class for best-practices reasons and it appears you are not calling [icode].Dispose()[/icode] on [icode]IDisposable[/icode] instances in your class. Most, if not every, control you will encounter in .NET uses a late or delayed binding mechanism so the … | |
Re: [URL="http://uuoc.com/"]UUoC[/URL] ;) [icode]grep -v " " file[/icode] | |
Re: I would be willing to discuss developing the application for you with Microsoft's .NET technologies. I think there is a "For Hire" section on Daniweb where this probably should have went ;) | |
Re: Here is what I use for the directory selector. The reason I handle exceptions is because sometimes the directory picker will default to the floppy disk or removable drive that is no longer attached and will cause an exception to be thrown. [code=delphi] procedure TMainFm.ButtonExportPathClick(Sender: TObject); Var Dir: String; begin … | |
Re: Here is code to save and retrieve an image with other columns: [code] Public Class frmImgUpload Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'Insert an image Using conn As New System.Data.SqlClient.SqlConnection("Data Source=apex2006sql;Initial Catalog=Scott;Integrated Security=True;") conn.Open() Using cmd As New SqlClient.SqlCommand("Insert Into Picture (Name, CreateDate, Picture) … | |
Re: [B]>> I have done a good amount of research and I'm still unable to determine how I can perform real emulation of a joystick. What I found on the web was using the mouse movements to simulate a joystick that moves an imaginary little ball.[/B] I don't know that a … | |
Re: Yes but it is not a good idea. I would include the SQL Server Installation file separately and created a "Install Wizard" in your application to run the installer with the parameters required for your set up. The reason for this is because in some cases the user will already … | |
Re: Why not use [icode]grep[/icode]? [code] sk@svn:/tmp/daniweb$ npname="part" sk@svn:/tmp/daniweb$ egrep -vi ".*${npname}.*in.*" parts.txt sk@svn:/tmp/daniweb$ npname="part part" sk@svn:/tmp/daniweb$ egrep -vi ".*${npname}.*in.*" parts.txt part1.in part3.in sk@svn:/tmp/daniweb$ cat parts.txt part1.in part part.in part3.in [/code] | |
Re: [QUOTE=sanch01r;1018332]Aliiya, You can add values from directly to a database using the following example, However, I recommend creating a stored procedure instead of using variables within your string, I just did it this way as an example: [code] string _InsertRow = "INSERT INTO `"+ DatabaseName +"`.`" + TableName +"` (`FirstName` … | |
Re: If i'm not mistaken the donations feature on daniweb just uses a paypal subscription for recurring billing. Donate a single time and cancel the subscription. You could also go through the donation process and get Dani's email from paypal before you confirm the donation, then close out of all that … | |
Re: I would treat the settings form more like a static class for this since thats more or less how you want to deal with it. Main form: [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.twoforms { public partial class … | |
Re: Why does down votes in the lounge count? [URL="http://www.daniweb.com/forums/post1026011.html#post1026011"]I just got down voted the other day[/URL]... funny that rep doesn't but votes do. | |
Re: This should do the trick: [code] #!/bin/bash find /tmp/ -type f -mtime +1 -exec echo {} \; > outfile cnt=`wc -l outfile | awk '{ print $1 }'` if [ ${cnt} -ge "1" ] ; then cat outfile | /bin/mail -s "subject" user@host.com fi rm outfile [/code] | |
Re: experts exchange has a point system too. I like the reputation system better because the point system would put more of a burder on moderators to assess each question and score it -- and they would likely have to do that before the question is answered. Then this would be … | |
Re: What other kind of firewall is there? Its just a question of how you filter the packets: based on source/dest IP, if TCP/UDP then port, if ICMP then message type, and you can build on top of TCP/UDP by doing [URL="http://en.wikipedia.org/wiki/Deep_packet_inspection"]deep packet inspection[/URL] or do about every type of filtering … | |
Re: Use the listview. Notice how in windows explorer you can use icons, details view, column view, etc. You can do the same thing with a listview. Someone on code project has authored an icon extracter class: [url]http://www.codeproject.com/KB/cs/IconExtractor.aspx[/url] Give that a shot. | |
![]() | Re: I also vote for subversion because it is the best. You can also integrate your svn repository with websvn using webdav on apache to do commits over HTTP. You can also hook up [URL="http://trac.edgewall.org/"]Trac[/URL] to your repository and have a ticketing system fully integrated with your code. IE you can … |
Re: The physical order of records written to an SQL table are determined by the clustered index if one is present. If one isn't present then they are just added in the order they are inserted and likewise they are returned in the order they are selected unless you use an … | |
Re: So ... what is your question? | |
Re: Upload a sample of your project, or at the very least post the designer and code file for the form in question. There are a lot of things that can go wrong, by simply being different, in grid setups. I have a similar project and this iterates through all of … | |
Re: What are the values of the statement when you get the stack overflow message? Is this a recursion issue? Post the code for your entire class. | |
Re: You're probably better off asking this question in a programming forum like c/c++. It is a question about the linux kernel but this forum has very low activity and I don't know that you will get an answer here. | |
![]() | Re: What I do is embed the [icode]CREATE TABLE[/icode] statements in the application. When it connects to a database it runs a test to see if the "SystemReg" table exists where I store system information related to database schema version [icode]SELECT OBJECT_ID('SystemReg', 'U') As Result[/icode] and if the return value is … ![]() |
Re: Upload the access database you are working with. | |
Re: Main script (main.sh): [code] #!/bin/bash /tmp/daniweb/s/f1.sh /tmp/daniweb/s/f2.sh /tmp/daniweb/s/f3.sh [/code] f1.sh: [code] #!/bin/bash echo "Script 1" [/code] f2.sh: [code] #!/bin/bash echo "Script 2" [/code] f3.sh: [code] #!/bin/bash echo "Script 3" [/code] Results in: [code=text] sk@svn:/tmp/daniweb/s$ ./main.sh Script 1 Script 2 Script 3 [/code] | |
Re: I don't think you can do backup/restore on UNC paths. You should look in to mapping a drive for that share on the SQL Server. | |
Re: Those are abstract concepts at best and without seeing the actual hosting agreement and contract its not possibly to answer your question to the depth you require. It sounds like your IT guy is trying to be a know-it-all to get his friend's hosting company more business ;) A private … | |
Re: If you write the byte content of the RTF directly to disk (bypassing the SQL Server) and open it with word do you receive the same formatting message when opening the document? I suspect that you will. If you do this eliminates SQL as a culprit in this issue. It … | |
Re: "" what Diamonddrake said. Even the hollywood movie industry and the RIAA is having a hard time stopping people from copying any digitial multimedia that you can consume on a PC. They have even integrated DMRA in to the Windows operating system yet copying is still a problem..... All I … | |
Re: DdoubleD -- Are you sure about removing the event handler? [code] private void button1_Click(object sender, EventArgs e) { comboBox1.SelectedIndexChanged = null; } [/code] That code won't compile for me. In my Delphi days that is exactly how you cleared event handlers and I like that design but I have never … | |
Re: Here is d6 code demonstrating how to call shell execute: [code] procedure TMainFm.Button1Click(Sender: TObject); Var p: PChar; begin p := 'C:\file path\appname.exe'; ShellExecute( 0, 'open', p, nil, nil, SW_SHOW); end; [/code] You also need to add [icode]ShellApi[/icode] to the [icode]uses[/icode] statement for the unit. | |
Re: Just create a new column and move the data over to the desired data type. I don't know of a one-liner to do this: [code] private void button1_Click(object sender, EventArgs e) { DataTable dt = new DataTable(); dt.Columns.Add(new DataColumn("RecordId", typeof(int))); dt.Columns.Add(new DataColumn("Picture", typeof(byte[]))); { DataRow row = dt.NewRow(); row["RecordId"] = … | |
Re: Also post the full exception message you receive. When you post your code be sure to use code tags: [noparse] [code] ...code here... [/code] [/noparse] | |
Re: This should do the trick: [code] IF OBJECT_ID('test_Customer', 'U') IS NOT NULL DROP TABLE test_Customer GO Create Table test_Customer ( id int identity(1000, 1) PRIMARY KEY, Surname varchar(50), Initials varchar(50), SEX_CODE varchar(50) ) GO IF OBJECT_ID('Sp_test_SaveCustomer', 'P') IS NOT NULL DROP PROCEDURE Sp_test_SaveCustomer GO CREATE PROCEDURE Sp_test_SaveCustomer ( @id int, … | |
Re: You need to post the queries that are causing this error. Also you need to check any [icode]DateTime[/icode] values you send to the SQL Server: [code=c#] public static bool SqlTypeInRange(DateTime value) { return ((value <= System.Data.SqlTypes.SqlDateTime.MaxValue.Value) && (value >= System.Data.SqlTypes.SqlDateTime.MinValue.Value)); } [/code] | |
Re: What shell are you using, and what error are you receiving? It seems to work for me: [code] sk@svn:/tmp$ for e in `cat file.txt`; do echo INSERT INTO \`omstest_omstest\`.\`GEN2_FIELD\` VALUES \(NULL, '$e', '$e', '4', '2009-10-05 00:00:00', '0' '0'\)\;; done; INSERT INTO `omstest_omstest`.`GEN2_FIELD` VALUES (NULL, 'ABC', 'ABC', '4', '2009-10-05 00:00:00', '0' … |
The End.