2,245 Posted Topics
Re: I don't disagree with what Salem recommended ... every source control solution has their advantages and disadvantages. I personally [b]love[/b] subversion. You're going to have a few seconds of latency with any cross-continental internet communications so you have to take that as a given. GIT does allow for decentralized commits … | |
Re: I dont know about invasion but one of the white guys on that picture looks like he was shopped in. His shoulder goes between the guys wrist and shirt and his skin color doesn't match the lighting for the rest of people. | |
Re: you can also use: [code=c#] if (!string.IsNullOrEmpty(textBox1.Text)) { //Do something } [/code] | |
Re: Unless you work for the ISP then you are out of luck. The mac address of connected computers can be easily hidden or altered if someone is running a home network: [url]http://en.wikipedia.org/wiki/Data_Link_Layer[/url] | |
Re: I'm off somewhere by a couple of pixels... but close enough: [code=c#] 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 frmPanel : Form { private Point start; private Rectangle origClip; public frmPanel() { InitializeComponent(); } private … | |
Re: Serkan: Technically the posted is right as his program "will not work with vista" but that would probably be better used as "I do not think the program will work with Vista" before you test it and afterwards "The program does not work with vista". papanyquiL: How did you deploy … | |
Re: Since you are using DynDns I will assume that you have a dynamic IP address. Can you host your own DNS while having a dynamic IP? Yes you can, but it is a bad idea. Each time your IP address changes you will have to update your glues at the … | |
Re: Here is the C# code, you should be able to port this to VB fairly easy: [code=c#] private void tabControl1_MouseClick(object sender, MouseEventArgs e) { int tabIndex = GetTabIndex(e.Location); if (tabIndex != -1) { MessageBox.Show("You clicked on tab " + tabIndex.ToString("F0")); } } private int GetTabIndex(Point p) { int result = … | |
Re: How does your PC freeze? Does the XP screen lock up and not do anything or does it freeze while doing a [URL="http://en.wikipedia.org/wiki/Power-on_self-test"]POST[/URL]? And can you verify that you reinstalled XP to solve this GRUB bootloader issue so you have a fresh install locking up? | |
Re: I don't know that this question related to C# or ASP.NET but it is closer to ASP.NET than C#. Please direct markup questions over to that forum. Also use code tags when you post: [noparse] [code=html] ...code here [/code] [/noparse] Advice: You should be designing your markup with visual studio … | |
Re: You do realize that .msi installers have custom launch conditions which can run pretty much any kind of code they want, right? So you're basically letting anyone run an .exe on your server. On your local machine are you using the IIS Development Server or full blown IIS to test … | |
Re: Ah, this question belongs in the ASP.NET forum instead of the C# forum. Please send those questions to the other forum in the future. For html you need an <img ...> tag to display the image in the client browser. Here is an example of the html from my project. … | |
![]() | Re: Try this: [code=c#] Response.ContentType = "application/octet-stream" Response.AddHeader("Content-Length", file.Length.ToString()) Response.AddHeader("Content-Disposition", "attachment; filename=""" & file.Name & """") Response.WriteFile(filepath) Response.Flush() return [/code] What you have looks like it should work but I usually dont clear/force data in/out of the buffered io stream ![]() |
Re: DOS uses "dir *" to match on the file name, such as "dir D*" will run for the currently directory and show all files/dirs beginning with D: [code=dos] C:\Documents and Settings\scott.SCOTTIE>echo D* D* C:\Documents and Settings\scott.SCOTTIE>dir D* Directory of C:\Documents and Settings\scott.SCOTTIE 07/22/2009 05:20 PM <DIR> Desktop [/code] Linux uses … | |
Re: You have a good start, what do you need help with? I have a similar code snippet online at: [url]http://www.daniweb.com/code/snippet1244.html[/url] It is for a winform application but the concept is portable to ASP.NET. | |
Re: This forum is intended to help people and not just "give me the solution". Please post your code and show us what difficulties you are having | |
Re: The answer to all of your questions is C#. You will find more online resources available and the syntax resembles java if you have any experience with it. I would say VB.NET over VB6 just because if you're learning a new language you might as well be learning the newest … | |
Daniweb support the [icode].doc[/icode] extension but not [icode].docx[/icode]. Can someone add support for the new extension so I can upload Word documents? Thanks [edit]I guess I could have .zip'd it. Oh well the post has already been made[/edit] | |
Re: So what you're really asking for is a list of programs that "speed games up"? That really doesn't have anything to do with C#... Let people hack if they want to, they will always find a way around it :) [url]http://www.google.com/search?hl=en&q=change+game+speed+software&aq=f&oq=&aqi=[/url] | |
Re: You need to pass the search criteria ... It may look something like this (I didn't try to compile it): [code=c#] protected void _btnSearch_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(_txtSearch.Text.Trim())) { Response.Redirect(Pages.TradeUp.Default + "?searchQuery=" + HttpUtility.UrlEncode(_txtSearch.Text)); } } [/code] | |
Re: Session.Abandon() is what you are looking for. You cant very well throw an error if the session has been abandoned because you don't have a place to store if it has been abandoned since you're clearing the session. Likewise when a client requests a new page it will start a … | |
Re: Why don't you post the CREATE() table structure with some sample data so we have something to work with. | |
Re: Change it to: [code=vb.net] Dim dr As OleDbDataReader dr = cmd.ExecuteReader() [/code] | |
Re: [QUOTE=VIeditorlover;924943][code] public static bool IsValidEmailAddress(string sEmail) { if (sEmail == null) return false; else return Regex.IsMatch(sEmail, @" ^[-a-zA-Z0-9][-.a-zA-Z0-9]*@[-.a-zA-Z0-9]+(\.[-.a-zA-Z0-9]+)*\.(com|edu|info|gov|int|mil|net|org|biz|name|museum|coop|aero|pro|[a-zA-Z]{2})$",RegexOptions.IgnorePatternWhitespace); } [/code][/QUOTE] That solution will not always work. Your best bet is to try to create a New MailAddress() and catch the exception. If it throws an exception then it is invalid, … | |
Re: Is your problem trying to find a ".Save()" method for your add-in or locating the My Documents path programmatically? If is the former then you need to post your code, if it is the latter then you can use [icode] Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)[/icode] | |
Re: lighthead is right -- this doesn't appear to be MSSQL and you need to group by the additional fields you are selecting. I think it would look like this: [code=sql] SELECT AcNum, FamName, GiveName, DeptNum, count(AcNum) FROM academic NATURAL JOIN interest WHERE LOWER(state)= 'ny' GROUP BY AcNum, FamName, GiveName, DeptNum … | |
Re: You're taking the wrong approach.. Conceptually you should be doing [code=sql] Declare @level2mgrId int Set @level2mgrId = 5 Select * From Level1 Where NOT EXISTS ( Select * From Level2 Where Level2.ParentManagerId = Level1.ManagerId and Level2.ManagerId = @level2mgrId ) [/code] Let me know if that wasn't what you were after | |
Re: I don't really understand what the problem is -- you deleted files and need them back? Was it just icons or the files themselves? It is easy to mix files on two operating systems with drives mounted on the same machine as when you go to save a file you … | |
Re: Not quite that easily but yes you can. You can specify an update query to run but how you formulate that query depends on the ODBC driver you are using. What type of database is it? Here is a sample of how to interface with ODBC in .NET [code=c#] private … | |
Re: You're getting that message from a remote mailserver and there isn't much you can do about it. The mailserver considers the message you are trying to send as likely spam and blocks it. You should wrap your sending message procedure in a try/catch block and continue on despite it failing. | |
Re: You are overwriting your file. You should refactor your code to keep the [icode]StreamWriter[/icode] open instead of open/closing it for every line you want to write. Call the overloaded method of [icode]StreamWriter[/icode] with the second parameter as "true" for append such as this: [code=c#] using (StreamWriter sw = new StreamWriter(@"C:\test.txt", … | |
Re: The concept is called IPC (inter-process communication). For a simple message you can use [icode]WM_COPYDATA[/icode] [url]http://boycook.wordpress.com/2008/07/29/c-win32-messaging-with-sendmessage-and-wm_copydata/[/url] [url]http://www.codeproject.com/KB/cs/wm_copydata_use.aspx[/url] | |
Re: Or you can do it yourself... [code=delphi] Var ComFile: THandle; function TCServer.OpenDeviceSerial: Boolean; Const RxBufferSize = 32768; TxBufferSize = 32768; Var DeviceName: Array[0..80] of Char; DCB: TDCB; Config : String; CommTimeouts : TCommTimeouts; begin Result := True; StrPCopy(DeviceName, ZSerialPort + ':'); ComFile := CreateFile(DeviceName, GENERIC_READ or GENERIC_WRITE, 0, Nil, OPEN_EXISTING, … | |
Re: You can use this: [code=c#] using System; using System.Drawing; using System.IO; namespace daniweb { public static class ImageUtils { public static bool IsValidImage(string FileName) { if (string.IsNullOrEmpty(FileName)) throw new ArgumentException("File name cannot be empty", "FileName"); if (!File.Exists(FileName)) throw new FileNotFoundException("File could not be found", FileName); try { //This lets us … | |
Re: [QUOTE=scru;919265](real programmers design their programs in such a way that fatal errors never occur)[/QUOTE] My methodology exactly. | |
Re: That is the point of an iframe. You can generate a Guid() and use it as a parameter to a page that shows the iframe'd content and switch the iframe dest based on that -- but how would this benefit you? | |
Re: Here is one such utility I wrote: [code=bash] #!/bin/bash if ( [ "$1" = "" ] ); then echo "" echo "-find: put all exceptions to files" echo "-del: delete all exception files" echo "-fixsuids: fix the most common suids" fi if ( [ "$1" = "-find" ] ); then … | |
Re: Reset the scroll bars: [code=c#] panel1.AutoScrollPosition = new Point(0, 0); [/code] | |
Re: Just make a string.Left extension and set the width on your overloaded object[] args.... [code=c#] 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.IO; using System.Xml; using System.Xml.Serialization; namespace daniweb { public partial class frmSerialIP : Form { public … | |
Re: Here is my output from compiling a 2.0 project: [code] c:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /unsafe- /checked- /nowarn:1701,1702 /nostdlib- /errorreport:prompt /warn:4 /baseaddress:285212672 /define:DEBUG;TRACE /main:WnProg.Program /reference:DLL\ApexLibrary.dll /reference:DLL\AxInterop.AcroPDFLib.dll /reference:bin\Debug\ChilkatDotNet2.dll .... [/code] You should be OK. | |
Re: Go in to your BIOS and shut down one of the hard drives and see which installation fails to boot and you will have your answer. Also if you wait for the the "timeout" which is 30 seconds you will boot in to the first entry in your file. If … | |
Re: What problem are you having exactly? Do the transaction not post, are you getting a response string from the payment gateway and if so can you post it? | |
Re: Add a public method on the child form: [code=c#] public void RemoveActiveTabPage() { tabControl1.TabPages.Remove(tabControl1.SelectedTab); } [/code] You should not expose controls on the form publically -- you should instead use public methods implementing the functionality you intend to call from other classes | |
![]() | Re: Upload the files. You can use libmagic to identify files based on the signature database |
Re: [icode]e.FullPath[/icode] gives you the full path of the modified file in [icode]private static void OnChanged(object source, FileSystemEventArgs e)[/icode]. Also since you are using a FileSystemWatcher you know the file is [b]probably in use by another application[/b]. In that case you should open the file like this: [code=c#] //This gives us … | |
Re: This is more of a theory question than a C# question .. I would post this in another forum. I personally don't deal with AI but maybe that will help you in searching for answers | |
Re: Why dont you change it to [code=delphi] if (HardwareIdIsValid(HardID)) then begin end else Application.Terminate; [/code] Then you could have a function with multiple hardware IDS embedded. | |
Re: Yes there is. The technology is called "OCR" or "Optical Character Recoginition". I think you can find some open source libs on the internet that do OCR. I personally use Atalasoft for OCR/Barcode recognition but you have to buy their software: [url]http://www.atalasoft.com/products/dotimage/ocr/default.aspx[/url] [url]http://www.google.com/search?hl=en&q=.NET+OCR&aq=f&oq=&aqi=g9[/url] [url]http://www.ocrtools.com/fi/Download.aspx[/url] [url]http://sourceforge.net/projects/tesseract-ocr/[/url] [url]http://www.freeocr.net/[/url] |
The End.