|
I think that you have to be a bit less vague in your question.
What is it that you want to sort? In what way should the sorting be external?
---
b { font-weight: normal; }
|
|
|
|
|
I want to sort the records which can not reside in the RAM there for i want that i get the chunks of the records and then sort them and in the end merge all these sorted runs.
abbas ali
|
|
|
|
|
I'm starting to get a picture... What you might be looking for is merge sort; an algorithm used when computers had so litte RAM that all data resided in files, and sorting had to be done by sorting small chunks into separate files and then merging the small sorted files into a single sorted file.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
We can loop through collection using foreach and IEnumerator.Can any body help
me when to use foreach and when to use Ienumerator since both will loop through collection and get the result?
|
|
|
|
|
foreach uses the IEnumerator retrieved from GetEnumerator() on an object that implements IEnumerable . So, foreach is using IEnumerator internally anyway.
|
|
|
|
|
Hi, I am currently suffering the limitations of the listbox control, I would really like to have a generic listbox, rather than the default of using objects.
It would also be really useful if I could make a custom listbox and override the functions "Items.Add" and "Items.Remove", but I can't work out how to override these functions.
I am not sure if these things are even possible, I haven't been able to find out much about them googling the web, can anyone point me in the right direction?
thanks
|
|
|
|
|
Martin23 wrote: like to have a generic listbox,
Do you mean you'd like to be able to add string s? If so, you can. (A string is nothing but a System.Object ).
/ravi
|
|
|
|
|
i am calling a function thats reads a text file but the strange thing is that it only reads two files at a time
this fucntion calls the reader function
while((this.fromdateDT.Equals(this.todateDT))!=tru e)
{
day=Convert.ToString(this.fromdateDT.Day);
month=Convert.ToString(this.fromdateDT.Month);
year=Convert.ToString(this.fromdateDT.Year);
temp=year+"-"+month+"-"+day;
this.fileName=this.pathString+"smdrbackup"+temp+". csv";
try
{
this.runReader(this.fileName);
}
catch
{
}
this.fromdateDT=this.fromdateDT.AddDays(1);
}
runReader is the function that reads the file
the code snipet that does the reading here in that function is
Stream str= File.Open(CSVpath,FileMode.Open, FileAccess.Read,FileShare.ReadWrite);
StreamReader sr;
sr= new StreamReader(str);
but if say for example it is suppose to read the following files: k2006-10-12,k2006-10-13,k2006-10-14,k2006-10-15. it reads the first two and say the last two do not exist. but they do and if i skip out the first two and have k2006-10-14,k2006-10-15,k2006-10-16 it once again only reads the first two even though in another order it said it could not find them.
so basically its only accessing two files after that it says every other fiel does not exist.................anyone have had a problem like this
kenny
|
|
|
|
|
My bet would be on the while loop's termination condition.
keroed_edmond wrote: while((this.fromdateDT.Equals(this.todateDT))!=tru e)
{
Did you try stepping your code through the debugger and checking if the loop runs more than two times?
|
|
|
|
|
hi all
this is what i plan to impliment. create a media server with some videos. develop an application to select the file and view it. i would be implimenting it on my college network. i do not plan to use media streaming.
i would need help on the following:
1. how do i get the media player up and running? does it have the functions to connect to the database and fetch the file?
2. whats the best way to impliment the database. should i keep an index in a databse like SQL or access?
regards
Vineet
|
|
|
|
|
I develope project for secondary school and I
need answer for my question...
How to make beckup for the database from my project?
waleed alkali
student
|
|
|
|
|
hi
i made a ToolStrip and placed it in a ToolstripContaier.
but i want it to be able to float. it is just stuck in the ToolStripContainer and doesnt float when i drag it out of container.
|
|
|
|
|
ASAIK the ToolStrip doesn't support this as standard, you might be able to write an extended version of it. Failing that there are several toolbar controls around which support this, Divelements[^] for one has a very good one (although not free anymore).
As of how to accomplish this I wouldn't have a clue at the moment and I'm too lazy to google it
|
|
|
|
|
Hi all,
Why does the FolderBrowseDialog comes up Blank?
it has the buttons ok and Cancel, but does not displays the Tree view.
Thanks & Regards,
Pramod
|
|
|
|
|
I've had the same problem once. It took me quite a while to find out that this strange behaviour appears, if I select MTA (multithreaded apartment) as COM threading model. After setting it back to STA (singlethreaded apartment) the FolderBrowserDialog worked just fine. So check, if your main method looks like that:
[STAThread]
static void Main()
{
...
}
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
My main function is exactly the same,but i am creating a multithreaded application, and i want to display the FolderBrowse dialog in a thread when some action is performed.
How do i do that?
Pramod
|
|
|
|
|
One more thing to notice is that if i try to open a OpenFile Dialog
that opens fine and works good,
but the File Browse Dialog does not.
Please help out...
Thanks & Regards,
Pramod
|
|
|
|
|
Hello
I am creating an application with no FormBorder, and
I want the user to be able to move the application as
if there was FormBorders. It is something similar to
Microsoft Live Messenger (In MLM you can move the window
by holding down the left mouse button)
So I want to move the application when the user holds
down the left mouse button on a picturebox.
Is there any way to do that with C#?
If so can you tell me an article which describe it,
or maybe tell me how to do it?
Thanks
QzRz
|
|
|
|
|
This can be done by handling the WM_NCHITTEST message and returning HTCAPTION when the cursor is over the picturebox. Returning HTCAPTION regardless of the cursor position will allow the user to drag your form by clicking anywhere within it.
/ravi
|
|
|
|
|
Use the Mouse Down, MouseMove and MouseUp events,
Capture the mouse oc-ordinates when the mouse is down and moving,
and set the location of the form to the mouse location (consider the offset)
i hope that works for you.
Regards,
Pramod
|
|
|
|
|
hi
how to save image into database with Datarow ? my db is sqlserver 2000 . i can insert and update value in db with Datarow but i can't save Image in db with Datarow .. how to do that ??
|
|
|
|
|
Hi
i am using .NET 1.1.
I am populating some data in DataTable using StoredProcedure.
DataTable dt = new DataTable();
DataRow dr;
DataSet ds = GetDataFromSP();
for (int k=0;k{
dr = dt.NewRow();
dr[0] = int.Parse(ds.Tables[0].Rows[k]["ID"].ToString());
dr[1] = ds.Tables[0].Rows[k]["COL1"].ToString()
dr[2] = ds.Tables[0].Rows[k]["COL2"].ToString()
dt.Rows.Add(dr);
}
//Binding to Grid using dt.
In this DataTable(dt) with same primary key multiple rows are returning by SP.
i want to check DataTable weather with this primary key is there any dupliate entry. if entry exists in DataTable, avoid the adding into the dt.
how to do this?
any sounds appriciated. awaiting for response.
regards
GV Ramana
|
|
|
|
|
Hi,
I have found som code on the Internet, which should export my datagridview to Excel. It also do that BUT it only export 4 of my 5 columns to excel (it's column number 4 it doesn't export which is Produkter.PrisExMoms from the database).
The code I use to export is:
#region Fakturalinier
int rIndex = 12;
foreach (DataRow row in dtOrdrelinier.Rows)
{
rIndex++;
int cIndex = 0;
foreach (DataColumn col in dtOrdrelinier.Columns)
{
cIndex++;
xlApp.Cells[rIndex + 1, cIndex] =
row[col.ColumnName].ToString();
}
}
}
#endregion
The code where I put the 5 columns into my datagridview:
#region FelterIDataGridView
// Databinding for the Grid
da2 = new OleDbDataAdapter("SELECT Ordre.Antal,
Ordre.VareNr, Produkter.Varenavn, Produkter.PrisExMoms FROM Produkter INNER
JOIN (Faktura INNER JOIN Ordre ON Faktura.FakturaID = Ordre.FakturaNr) ON
Produkter.VareNr = Ordre.VareNr WHERE FakturaID=@fakid", cn);
da2.SelectCommand.Parameters.Add("@fakid",
OleDbType.Integer);
da2.SelectCommand.Parameters["@fakid"].Value = fakid;
//create datatable
dtOrdrelinier = new DataTable();
//fill datatable
da2.Fill(dtOrdrelinier);
//create colum to hold the sum of other two colums
DataColumn col = new DataColumn("RaekkeBeloeb");
col.DataType = typeof(System.Decimal);
col.Expression = "Antal*PrisExMoms";
//add the colums
dtOrdrelinier.Columns.Add(col);
//bind datatable to grid view
dgrOrdre.DataSource = dtOrdrelinier;
#endregion
Anyone who can see why the column 4 (Produkter.PrisExMoms from the database) doesn't export to excel with the other columns?
Kind regards,
simsen
|
|
|
|
|
I found out, that the problem didn't was in the code, but in excel, where I had merged 2 columns together in the rows, where the datagridview should be.
I worked around the problem with the following code:
#region Fakturalinier
int rIndex = 12;
foreach (DataRow row in dtOrdrelinier.Rows)
{
rIndex++;
int cIndex = 0;
foreach (DataColumn col in dtOrdrelinier.Columns)
{
cIndex++;
if (cIndex == 4)
{
cIndex++;
}
xlApp.Cells[rIndex + 1, cIndex] = row[col.ColumnName].ToString();
}
}
#endregion
simsen
|
|
|
|
|
I want to make a mobile agent that travels from one machine to the other with data and code. the mobile agent interacts with the respective distination computer and fetch the results back to the invoking server system. how can i do that. kindly give me some example code as i am a student of MS and familiar to C# but totally new to mobile agent programming.
thanks
shah khalid
|
|
|
|