2,245 Posted Topics
Re: [code=bash] #!/bin/bash for i in *.jpg; do c1=`expr substr ${i} 1 1` c2=`expr substr ${i} 2 1` c3=`expr substr ${i} 3 1` dir=${c1}/${c2}/${c3} echo mkdir -p ${dir} echo mv $i ./$dir done [/code] You will want to test that the file name is at least 3 characters | |
Re: [code=csharp] private void button2_Click(object sender, EventArgs e) { foreach (DataGridViewRow row in dataGridView1.Rows) { if (row.IsNewRow) continue; bool hasData = false; for (int i1 = 0; i1 < dataGridView1.Columns.Count; i1++) { if (!string.IsNullOrEmpty(Convert.ToString((row.Cells[i1].Value == null ? string.Empty : row.Cells[i1].Value)))) hasData = true; } if (!hasData) { row.ErrorText = "Empty data"; … | |
Re: [QUOTE=jbennet;921459]yes i think[/QUOTE] Unrelated to the thread but I have always wondered why you have an american flag in your avatar but you're from scotland? | |
Re: So what is the question? How you create a C# application (if so then you're in the wrong forum) or how to open a socket in vb.net? | |
Re: For simple IPC use WM_COPYDATA: [url]http://www.vbaccelerator.com/home/net/code/libraries/windows_messages/Simple_Interprocess_Communication/article.asp[/url] | |
Re: What programming language are you using? Here is how you use parameters/variables in mssql: [code=sql] Declare @CustomerId int Select * From Customer Where CustNumber = @CustomerId [/code] | |
Re: Change your queries over to using parameters so you can tell what the problem is: [code=vb.net] Imports System Imports System.Data Imports System.Data.SqlClient public class MainClass Shared Sub Main() Dim thisConnection As New SqlConnection("server=(local)\SQLEXPRESS;" & _ "integrated security=sspi;database=MyDatabase") 'Create Command object Dim nonqueryCommand As SqlCommand = thisConnection.CreateCommand() Try ' Open Connection … | |
Re: "[b]Inherits[/b] System.Windows.Forms.Form" did you intend inherits or did you mean "import"? Also use [icode]System.Windows.Forms[/icode] and dont repeat the last class name. | |
Re: It sounds like you're not updating "createConnection" with the value selected on the previous form. You probably need to upload a project so we can take a look at it. The problem you're describing is occuring outside the scope of the code you posted. | |
Re: You typically just put a parent in the constructor: [code=csharp] public IOAnalog() { } public IOAnalog(Sensor Parent, IOAnalogType AnalogType) : this() { this._parent = Parent; this._IOType = AnalogType; } [/code] Will this not work? | |
Re: [code=csharp] string xmlData = System.IO.File.ReadAllText(@"C:\test.xml"); System.IO.File.WriteAllText(@"C:\test.xml", xmlData); [/code] | |
Re: [code=vb.net] Imports Microsoft.Win32 Public Class FormHeader Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim ofd As OpenFileDialog = New OpenFileDialog() ofd.InitialDirectory = "C:\data" ofd.Multiselect = False If (ofd.ShowDialog() = Windows.Forms.DialogResult.OK) Then Dim connStr As String = String.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0}", ofd.FileName) Console.WriteLine(connStr) End If End Sub End … | |
Re: [b]I have already answered your question.[/b] Please see [url]http://www.daniweb.com/forums/thread209172.html[/url] An "Image" is stored on disk in the native "image format" which is represented with "binary". "Binary" and "Image Format" are the same thing. However a [icode]byte[][/icode] array and [icode]Image[/icode] are different in managed code. Go back to the original thread … | |
Re: That doesn't really give us enough information to indicate what the problem may be other than "it doesn't work." Please give us a little more background on the issue. What I did to solve this for my master pages was putting a placeholder in the <head> tag of the master … | |
Re: Also -- Do you want to include log4net with your application? If you don't know what it is then the answer is probably 'no'. Even if you do know what it is I would still be tempted to say no. :) | |
Re: You have already asked this question on: [url]http://www.daniweb.com/forums/thread208362.html[/url] Please do not open new threads with the same question. | |
Re: This is really an SQL question. What you would do is: [code=sql] Declare @Name varchar(1), @City varchar(1), @State varchar(1) Set @Name = 'a' Set @City = 'b' Set @State = 'c' Insert Into Customer (Name, City, State) Select @Name, @City, @State Where NOT EXISTS ( Select * From Customer (NOLOCK) … | |
Re: [code=bash] sk@svn:~/test$ ls -al *.sql | awk '{ print $8 }' file1.sql file2.sql file3.sql [/code] If you're reading this from a file you can change it to: [code=bash] sk@svn:~/test$ ls -al *.sql >> someFile sk@svn:~/test$ awk '{ print $8 }' someFile file1.sql file2.sql file3.sql [/code] | |
Re: Not necessarily. You could do this: [code=sql] Declare @CityId int, @CategoryId int Set @CityId = (select city_id from city_master where city_name= 'abc') Set @CategoryId = (select city_id from city_master where city_name='123') Insert into wines_available(name, address, city_id, category_id) values (@name, @address, @cityid, @categoryid) [/code] | |
Re: You need to format the string before you populate the ListView. To get the thousand separator without decimals use: [code=c#] private void button2_Click(object sender, EventArgs e) { int i1 = 5555; Console.WriteLine(i1.ToString("N0", System.Globalization.CultureInfo.InvariantCulture)); } [/code] | |
Re: It is almost certainly not because of the number of users. As you indicated SQL Server can handle hundreds of users with no problem. What you should do is run the SQL Server Profiler and watch the database activity. Also check the windows event log and SQL Server error log … | |
Re: What distribution or operating system are you referring to? In linux the init.d files do exactly this by writing out PID files to see if the program is still alive when it re-executes. Please provide more information. | |
| |
Re: Please see this thread regarding to drag and drop: [url]http://www.daniweb.com/forums/thread208280.html[/url] Here is another thread in C# if you can port the code: [url]http://www.daniweb.com/forums/thread207602.html[/url] The VB code provided: [code=vb.net] Public Class FormDragDrop Private Sub FormDragDrop_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.AllowDrop = True End Sub Private Sub … | |
Re: Regex syntax varies depending on what library you are using. Is this the .NET regex or something built inside of Google Analytics? | |
Re: Please use code tags when posting code on daniweb: [noparse] [code=c#] ...code here... [/code] [/noparse] Next -- Please stop opening duplicate thread. I have already given you the answer to that in [url]http://www.daniweb.com/forums/thread209172.html[/url] For some reason you have in your head that I am not storing the image as binary … | |
Re: Are you wanting to serialize items included in the ListViewItem's .Tag property, or serialize the entire listview.items collection? | |
Re: Hello coder 2050 and welcome to Daniweb! :) Please use code tags when you paste code on Daniweb, it helps keep the threads clean. To answer your question you will want to do something like this. Also -- Are you sure that you shouldn't be submitting form fields instead of … | |
Re: Why not have a boolean "headerWritten" and set it to false. Do the dr.Read(). If headerWritten is false then write the header and set it to true. Then continue writing the detail | |
Re: I have included a few methods to create the OleDb connection strings for you depending on the version of Excel. [code=csharp] 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 frmExcel : Form { public frmExcel() { … | |
Re: What is "relational algebra"? Also what approaches have you tried? Post your queries here and what problems you are having with them and we will work from there. | |
Re: Yeah ... that happens if you call that property before the session initializes. That happened to me -- I think in your Global.asax if you call it in your Application_Start it will throw that error. Check the call stack and report back where it is being called from. | |
Re: Is the information listed under "1 - ISP" the information they sent you on paper to configure your device or is it the ISP's router and you have another router of your own behind theirs? | |
Re: Please use code tags when posting code: [noparse] [code=vb.net] ...code here [/code] [/noparse] You need to specify the Insert, Update, and Delete queries for the dataset. Use the IDE and "Add -- New Item -- DataSet". Right click and add a table adapter. The wizard will guide you through the … | |
Re: Why don't you use Microsoft SQL Server? You need to run an SQL Server as an application on a server and have the clients connect to it. You can get a free version of MSSQL. I do not advocate any of the Linux databases although they will work. You will … | |
Re: [code=csharp] private void button2_Click(object sender, EventArgs e) { this.button2.BackgroundImage = Image.FromFile(@"C:\picture.bmp"); } [/code] | |
Re: I don't think there is anything you can do about this. You have to use volume purchasing licenses for the new terminal servers or use an older version of office. | |
Re: [code=sql] Create Table TestTable ( SomeInt int, SomeString varchar(10) ) GO --This adds an auto number column Alter Table TestTable Add RowNumber int identity(1, 1) [/code] | |
Re: Just read it from the file system with [icode]File.Read()[/icode] if you have full trust on the site. | |
Re: What do you mean order them? Windows Explorer orders the files in the directory based on the column you select. Unless you're talking about ordering the contents of those files based on the value in an external textfile? | |
Re: What is the exact error message you receive? It sounds like a datatype mismatch, truncated string, or something along those lines. The query syntax itself is OK. I verified it using: [code=sql] create table Logindls ( firstname varchar(1), lastname varchar(1), Password varchar(1), Repassword varchar(1), email varchar(1), question varchar(1), answer varchar(1), … | |
Re: As far as I know it is impossible to use a driver to open a password protected Excel file. You have to use COM/Excel automation to access the data. The behavior is documented for ODBC but as far as I know OleDb is the same: [url]http://support.microsoft.com/default.aspx?scid=kb;EN-US;211378[/url] That also is old … | |
Re: Do you have access to the router? Are the connections wired or wireless? | |
Re: How old is the CD? They do have a shelf life: "At present, stated CD-R lifetimes are estimates based on accelerated aging tests, as the technology has not been in existence long enough to verify the upper range, 120 years. With proper care it is thought that CD-Rs should be … | |
Re: Please use code tags when you post code on daniweb: [noparse] [code=c#] ...code here... [/code] [/noparse] Can you .zip your project and upload it? You can do this my clicking "Go Advanced" then "Manage Attachments" and uploading the archive. Are you calling [icode]symmetricKey.Padding = PaddingMode.PKCS7;[/icode] in your method that encrypts … | |
Re: [code=c#] using System; using System.Collections.Generic; namespace daniweb { class MultiArray { private static string[] GetTestData() { List<string> result = new List<string>(); result.Add("return1.MV TE244654.MV b43tgwg.sp"); result.Add("01.62 00.83 100.76"); result.Add("01.62 00.83 100.77"); result.Add("01.60 00.83 100.78"); result.Add("--.-- 00.83 100.79"); result.Add("--.-- 00.82 100.80"); result.Add("01.63 00.83 100.81"); result.Add("01.63 00.83 100.82"); result.Add("--.-- 00.83 100.83"); result.Add("--.-- 00.83 … | |
Re: First: use code tags when posting your code: Secondly: This is an MSSQL question, not an ASP.NET question. The problem here is your query syntax. Third: The "not equal" operation in MSSQL is <> and not !=. You also need to select one record from your interview table to compare … | |
| |
Re: Can't you just attach the debugger to the process? It sounds like you need to redeploy but maybe someone else has another idea |
The End.