2,245 Posted Topics
Re: I think you're looking for the [icode]file[/icode] command: [code] sk@sk:~$ file `which bash` /bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, dynamically linked (uses shared libs), stripped [/code] | |
Re: You can also download the source for linux shells to see what they do. Look at your favorite linux distributor's package collection for zsh, tclsh, bash, csh, sh, etc. | |
Re: I have done that for a password reset but conceptually it is the same thing for signing up. In this case the site is an internal project so I actually send the email when you click the "Submit" button [b]but[/b] you should insert a record in to an SQL database … | |
Re: I doubt you need a Microsecond timer. That barely gives whatever logic you call enough time to initialize. What are you trying to do? | |
Re: You can decorate properties, events, etc with attributes to hide them in the designer. [code] // // Summary: // Occurs when the mouse wheel moves while the control has focus. [Browsable(false)] [EditorBrowsable(EditorBrowsableState.Advanced)] public event MouseEventHandler MouseWheel; [/code] The event is there but it is not implemented for the panel because … | |
Re: You should let the Win32 API look that up for you: [code] Dim dir As String = Environment.GetFolderPath(Environment.SpecialFolder.Personal) [/code] | |
Re: I fail to see how this question relates to MSSQL Server. Please explain your problem a little more | |
| |
Re: That depends on what DNS server you're using. Are you using a windows server, *nix server with bind, *nix server with djbdns, godaddy hosting, or...? | |
Re: Perhaps if you explained what information you were attempting to extract then someone could help you. Please explain what you are trying to accomplish. | |
Re: Manually databind the property/control in code: [code] private void frmMiscTasks_Load(object sender, EventArgs e) { checkBox1.Checked = Properties.Settings.Default.SomeSetting; } private void frmMiscTasks_FormClosing(object sender, FormClosingEventArgs e) { Properties.Settings.Default.SomeSetting = checkBox1.Checked; Properties.Settings.Default.Save(); } [/code] | |
Re: Hyperterminal is just a simple connection interface. How are you connecting to the GSM modem? With a SerialPort? USB? You want to get the comms working natively inside your application if you intend to build something useful out of it. Post more information about the hardware and connection methods you're … | |
Re: Here you can invoke an exe on another thread so while you're waiting for the program to load your application will continue running. This will wait until the process has started then move the window: [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; … | |
Re: I don't think I have anything to add to this thread regarding Excel. Adatapost already linked to all of my knowledge for the product :P [B]>>I tried below code... it's doesn't work as well... any got solution for this? Thanks.[/B] What do you mean by "doesnt work well"? Is it … | |
When you post to a thread daniweb automagically subscribes you to the thread and send you an email when someone posts to the thread. This is not the case with group discussions though. I have posted on a discussion and it doesn't subscribe me with an email notification by default. … | |
Re: [B]>>If i try first the 180 days report after a long time (of 1 to 2 hrs) it gives error.[/B] You're probably choking the SQL Server. You should not generate a report that takes 1+ hours on-demand from a web interface. Schedule it in some sort of queue and notify … | |
Re: Sure. Post the cron line you're using. Please use code tags when posting codes on daniweb: [noparse] [code=text] ...cron here... [/code] [/noparse] | |
Re: steve is right. Take a look here: [url]http://weblogs.asp.net/owscott/archive/2005/08/26/Using-connection-strings-from-web.config-in-ASP.NET-v2.0.aspx[/url] | |
Re: Don't use [icode]ExecuteReader()[/icode] for a single scalar value, use [icode]ExecuteScalar()[/icode] instead. This is more along the lines of what you're trying to accomplish: [code] private static string GetMemberFilePath(int memberid) { const string query = @"Select FName From MemberInfo Where MemberId = @MemberId"; using (SqlConnection conn = new SqlConnection(connStr)) { conn.Open(); … | |
Re: [QUOTE=WaltP;1099662]IMAO spoonfeeding should be an offense. But the Rules as written allow it. This has been discussed before and while spoonfeeding was not encouraged, what could we really do about it? Infracting is too harsh but that's the only 'punishment' we have.[/QUOTE] Who cares? If one of the daniweb solvers … | |
Re: [B]>>is there a way to make this app run every x seconds rather than on a buttonClick? do i need a timer? make the whole app run as a service?[/B] If you want the application to run without user intervention I would suggest using a service. What are you trying … | |
Re: An access database? SQL Server? MySQL? You haven't provided enough information to answer your question. | |
Re: You can call [icode]Convert.ToString()[/icode] on [icode]DBNull.Value[/icode] and it will return [icode]string.Empty[/icode]. | |
Re: It depends when you're trying to check the value. Please describe what you are doing in a little more detail. | |
![]() | Re: Try something along these lines: [code] private void frmSelectEmployee_Load(object sender, EventArgs e) { const string query = @"Select RepNumber From UserTable (NOLOCK) Order By RepNumber"; DataTable dt = null; comboBox1.BeginUpdate(); try { using (SqlConnection conn = new SqlConnection(connStr)) { conn.Open(); using (SqlCommand cmd = new SqlCommand(query, conn)) { using (SqlDataReader … |
Re: What version of windows are you receiving this on? Anything created in your profile should be a candidate for deletion by the current user. | |
Re: I performed the following steps and it worked: 1) Downloaded [URL="http://www.codeproject.com/KB/cs/Industrial_Controls2/LBIndustrialCtrls_src.zip"]LBIndustrialCtrls_src.zip[/URL] 2) Unpacked to C:\dotnetwin\LBIndustrialCtrls_src 3) Open the solution, built the project in Release mode 4) From another project I added a reference to C:\dotnetwin\LBIndustrialCtrls_src\LBIndustrialCtrls\bin\Release\LBIndustrialCtrls.dll 5) Clicked "Customize Toolbox" then browsed to C:\dotnetwin\LBIndustrialCtrls_src\LBIndustrialCtrls\bin\Release\LBIndustrialCtrls.dll 6) The controls were added in my … | |
Re: [B]>>rch1231[/B]: While your example is technically correct I would not recommend it. DNS entries for mail records ([icode]MX[/icode]) are structured: [icode]@ IN MX <PRIORITY> <HOST>[/icode] Where: [icode]@[/icode]: defining entry. @ Defaults bind to the zone [icode]Priority[/icode]: A numeric priority. The lowest-numeric is served first. If it cannot be contacted it … | |
Re: Can you upload your project? There are a lot of things that could be going wrong here. | |
Re: Use the application config, as mentioned above, or use [icode]OpenExeConfiguration()[/icode]. Take a look at this thread for a full example of [icode]OpenExeConfiguration()[/icode]: [url]http://www.daniweb.com/forums/thread206760.html[/url] | |
Re: [B]>>Will it require any license pricing? [/B] No, it won't. Take a look at Microsoft's site: [url]http://www.microsoft.com/Sqlserver/2005/en/us/compact.aspx[/url] You technically need to fill out an online form where Microsoft "authorizes" you to distribute SQL Server. See [URL="http://www.microsoft.com/sqlserver/2005/en/us/compact-redistribute.aspx"]Redistribution Rights[/URL] | |
Re: Use a timer to poll the sockets: [URL="System.Threading.Timer"]System.Threading.Timer[/URL] or [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.timer.aspx"]System.Windows.Forms.Timer[/URL] | |
Re: Have you even tried converting that code? By the way you're leaking resources. Post the vb.net code you have so far and we'll go from there! | |
Re: The GUI/controls can only be updated on the thread which they were created (your main thread), that is the cause of your error. Another unsafe thing here is losing the reference to your thread as it could be garbage collected. Do you really need to create a thread or would … | |
Re: The 3.5 framework is an extension of the 2.0 framework, so the utilities are often the same. This is unlike comparing framework 2.x and 1.x however, because 2.x completley replaced 1.x. Take note of two MSDN articles for 2.0 and 3.5 pointing to the same utility: [url]http://msdn.microsoft.com/en-us/library/k6h9cz8h(VS.80).aspx[/url] [url]http://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx[/url] Have you … | |
Re: firoz -- "fastest" isn't always best. The only type of index limited to one per table is a clustered index. The table's data is physically stored in order of the clustered index. Now image this for example: You have an "Invoice" table with "CreateDate" column and have a clustered index … | |
Re: [QUOTE=Aia;930625]Ancient Dragon> Presidents have to be leaders Titles don't make leaders. [/QUOTE] Titles don't make leaders but as President you will lead. If you don't make the calls due to your personal inability to make a decision then your office will make it for you. One way or another the … | |
Re: Also be sure to clean up after yourself. [icode]System.Diagnostics.EventLog[/icode] implements [icode]IDisposable[/icode] [code] private void button1_Click(object sender, EventArgs e) { System.Diagnostics.EventLog[] logs = System.Diagnostics.EventLog.GetEventLogs(); foreach (System.Diagnostics.EventLog log in logs) { foreach (System.Diagnostics.EventLogEntry entry in log.Entries) { Console.WriteLine(entry.Message); } } //Clean up foreach (System.Diagnostics.EventLog log in logs) { log.Dispose(); } } [/code] | |
Re: Why don't you say how the info is being stored in memory? Or do you want to dump your entire RAM to disk just to be sure? If the buffer is stored as a [icode]MemoryStream[/icode] the process for writing would be slightly different than, say, a [icode]StringBuilder[/icode]. | |
Re: You can create an app_offline.html to disable the website in IIS. See: [url]http://www.daniweb.com/forums/post1108991.html#post1108991[/url] You could also use the IIS7.0 configuration manager to "Stop" the website. You can use the DNS manager to "Pause" a domain to stop inbound resolve requests. Right click on the zone and hit "Properties", and you … | |
Re: What symptoms are your experiencing? There are a lot of ways that a computer could "disturb" a network | |
Re: Post the code for your ASP.NET application. Please use code tags when posting code on daniweb: [noparse] [code] ...code here... [/code] [/noparse] You will want to use [noparse][code=c#][/noparse] or [noparse][code=vb.net][/noparse] depending on the language. | |
Re: You do realize you posted your username and password in the code, right? | |
Re: There are standard .NET interfaces for this: [code] public class SomeVariableClass : INotifyPropertyChanging, INotifyPropertyChanged { private int someVal; public int SomeVal { get { return someVal; } set { if (someVal != value) { FirePropertyChanging("SomeVal"); this.someVal = value; FirePropertyChanged("SomeVal"); } } } public SomeVariableClass() { } #region INotifyPropertyChanging Members public … | |
Re: [B]>>scranton:[/B] Why don't you explain what you're trying to accomplish in more detail? apegram pointed you in a good direction with abstraction but sometimes you run across odd scenarios where you don't necessarily want to implement it (namely an abstract base form you inherit from, it is possible to do … | |
Re: What is the question specifically? You can have 5 checkboxes with [icode]AutoPostBack=True[/icode] and a button which causes a postback. The [icode]GetPostbackControl()[/icode] indicates which control triggered the postback, otherwise you would only know that a postback occured but not what triggered it. Sometimes you want the postback to behave differently depending … | |
Re: Here is an example using the SQL Native driver: [code] using System; using System.Data.SqlClient; using System.Windows.Forms; using System.Data; namespace daniweb { public partial class frmSql : Form { public frmSql() { InitializeComponent(); } private void button3_Click(object sender, EventArgs e) { const string connStr = "Data Source=apex2006sql;Initial Catalog=ServManLeather;Integrated Security=True;"; const string … | |
Re: What is [icode]IFNULL[/icode]? You have to wrap your query in order to reference calculated columns. I can't verify the syntax, but this should work: [code] Select *, Sum(CostperItem) * Sum(QuantityAvailable) From ( SELECT Inventory_Item.ItemName, ( SELECT SUM( TotalAmount / Quantity ) FROM Finance_Expenses, Inventory_ExternalOrder WHERE OrderDate <= '2009-08-31' AND OrderDate … |
The End.