|
Thanks for the reply !
Will that not just put rtb2 at the bottom of rtb1 ?
What i need is to append the first line of rtb2 to the first line of rtb1 and the sencond line of rtb2 on the second line of rtb1 and so on.....
|
|
|
|
|
Sorry I didn't read you org post carefully enough.
In that case your best bet is the solution provided above by Robert Rohde I think.
-Richard
|
|
|
|
|
Can some one point me in the right direction on how to implement a smal C++ console app in Csharp.
|
|
|
|
|
For clarification:
1. Do you want to use or implement the C++ console app in C#? (Whereas the second doesn't make any sense to me, cause how should i implement a C++ app with C#)
2. What exactly do you mean by use (if that's what you want)?
www.troschuetz.de
|
|
|
|
|
I'm implementing two diferrent code parts.
I'ts a chessplay. I have the functionality in C++. Now a want to add a GUI to the game. So a want to use functions in C++ from C#
|
|
|
|
|
I think you'll have to pinvoke the functions. But I'm not sure if it's possible when there inside a console app. Didn't use it much besides calling some win32 apis.
www.troschuetz.de
|
|
|
|
|
You can attach your own streams to a System.Diagnostics.Process class object to send/recieve console style input.
|
|
|
|
|
|
Maybe you want to make your own DLL with the console functions, and methods.
|
|
|
|
|
hi
i want to download Directx .0 SDK For Framework 1.0 from this link :
http://www.microsoft.com/downloads/details.aspx?FamilyID=edb98ffa-a59c-4c23-9b92-ba304f188314&DisplayLang=en
but when i follow steps for download,microsoft say to me :
Validation Incomplete: Windows Must Be Activated
how to download it without this problem ?
or please give me another links to download dx90 sdk and documention and ...
thanks
|
|
|
|
|
hdv212 wrote: how to download it without this problem ?
Buy Windows XP
|
|
|
|
|
|
I cant figure out when to use base classes and when to use common
methods that just take in different parameters and do the same task,
instead of having 1 method for each of my objects.
ok so in my data layer (3-tier enterprise web solution), I have
4 classes: mygets, myinserts, mydeletes, myupdates.
Each of these hit the database and do the appropriate work for
7 of my tables: tb1, tb2, tb3 ... tb7
mygets has these methods gettb1(tb1key), getAlltb1, gettb2(tb2key), getAlltb2 ... tb7
each returns a dataset
myinserts takes all fields for tables (as sql parameters) and adds them:
addtb1(field1, field2 ... ), addtb2(field1, field2, ... ) etc.
same for myupdates and mydeletes.
whats the best way to structure having to code the least, and have it
consistent: base classes which have the common functions for each of these 4?
or static methods that basically take in different parameters and get the same
stuff done?
which is more efficient?
related question: are base classes just a better "location" to put common
methods that can be used by a lot of classes? classes that derive from them?
thanks
M
-- modified at 2:09 Tuesday 4th April, 2006
|
|
|
|
|
Hello,
Why not use static overloaded methods from a class say "DatabaseHelperClass"?
GetRows(string key,string value, string tableName)<br />
GetRows(Hashtable filter,string tableName)<br />
GetRows(string tableName)
and same for other tasks??? As far as additions/updates are concerned, you can put the values in a hashtable such that the Key represents the column name and value represents the value of the column you want to add or update in the table. with respect to the key..
For Additions
AddRow(string tableName,Hashtable values)
For Updates
UpdateRows(string key, string value, string tableName, Hashtable values)<br />
GetRows(Hashtable filter,string tableName, Hashtable values)<br />
UpdateRows(string tableName, Hashtable values)
you can do similar for deletions as well. Don't you think it will be a clean approach?
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
yeah thats what Im doing: I have overloaded functions that do Gets, Insert, Deletes and Updates
for ALL tables.
My question was: where should I put these overloaded functions? in a base class or as common static methods in another class called Utils?
I realized base classes are only useful for object classes, meaning non-static instances.
And also, in my business layer, I do have one class for each table which becomes an object. These table objects then use my data layer to get, insert, delete and update.
pretty clean huh!
M
|
|
|
|
|
Hi
You might like to try using OOP[^]
Create a class for each table. Include properties for each field, and the methods that operate on those properties.
Just a thought
----------------------------
Be excellent to each other
EasiReports[^] My free reporting component for WinForms.
|
|
|
|
|
Hello,
In my opinion, making a class for each table is not an optimal solution because a database might contain alot of tables, and it can expand also, which will increase the implementation cost and It may also result in code replication.
If generic methods for Addition, Update, Deletion and retrieval are deviced then it won't affect much as far as implementation is concerned. Developers will only need to add functionality to use newly added tables where ever it is required without implementing new classes for each table.
What you think?
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
---how can I recieve a custom message sent from COM server to C# client?
if I send a message in the range 0 to WM_USER-1, it works.
but fail when I send a message above WM_USER?
can someone solve this problem for me?
thank you very much!
Vincent
|
|
|
|
|
Hi All
How to provide values for the parameters when i populate the 'Command'object's parameters using "CommandBuilder.DeriveParameters".
In what scenarios we have to use CommandBuilder.DeriveParameters?
Thanx in advance
Regards,
Sivamani
|
|
|
|
|
How to get inactive / minimized form blink in the taskbar, when something change in that form, like in the chat form. Thanks
<italic>Work hard, Work effectively.
|
|
|
|
|
Back to old good days it was done using FlashWindow Win32 API call. I'm sure there's a managed version of that function is around or at least you can use FlashWindow thru Platform Invoke.
Best regards,
-----------
Igor Sukhovhttp://sukhov.net
-- modified at 0:57 Tuesday 4th April, 2006
|
|
|
|
|
|
Hi.Anybody can give me any hints where is my problem in this code...
using System;
public class Polynomial
{
// convert list of coefficients from input string
// to an array of doubles
public static double[] convertPoly(System.String theStr)
{
// obtain numerator coefficients from text field
theStr = theStr.Replace(',', ' ');
theStr = theStr.Trim();
SupportClass.Tokenizer theToken = new SupportClass.Tokenizer(theStr);
double[] theCoeff = new double[theToken.Count];
// load coefficients into array in reverse order
int index = 0;
for (index = theCoeff.Length - 1; index >= 0; index--)
{
theCoeff[index] = (System.Double.Parse(theToken.NextToken()));
}
return theCoeff;
}
// convert list of polynomials from input string
// to an array of doubles
public static double[] convertPolyList(System.String theStr)
{
// initialize return value to unity
double[] theResult = new double[]{1};
// polynomials seperated by ']' characters
theStr = theStr.Replace('(', ' ');
theStr = theStr.Replace('[', ' ');
theStr = theStr.Replace(')', ';');
theStr = theStr.Replace(']', ';');
theStr = theStr.Trim();
SupportClass.Tokenizer theToken = new SupportClass.Tokenizer(theStr, ";");
int index = 0;
for (index = 0; theToken.Count > 0; index++)
{
double[] theArray = convertPoly(theToken.NextToken());
theResult = multiply(theResult, theArray);
}
return theResult;
}
public static double[] multiply(double[] array1, double[] array2)
{
double[] theResult = new double[array1.Length + array2.Length - 1];
int outer = 0;
for (outer = 0; outer < array1.Length; outer++)
{
int inner = 0;
for (inner = 0; inner < array2.Length; inner++)
{
theResult[outer + inner] += (array1[outer] * array2[inner]);
}
}
return theResult;
}
public static void showArray(double[] theArray)
{
int index = 0;
bool first = true;
for (index = (theArray.Length - 1); index >= 0; index--)
{
if (!first)
{
System.Console.Out.Write(", ");
}
System.Console.Out.Write(theArray[index]);
first = false;
}
System.Console.Out.WriteLine();
}
// main entry point for test purposes only
[STAThread]
public static void Main(System.String[] args)
{
if (args.Length == 1)
{
showArray(convertPolyList(args[0]));
}
else
{
System.Console.Out.WriteLine("usage: java Polynomial (-1,1)(-1,1)");
}
}
}
|
|
|
|
|
Standard question #2:
What error message do you get?
---
b { font-weight: normal; }
|
|
|
|
|
Guffa wrote: Standard question #2
What is standard question #1? and do you have a whole list of these standard questions?
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|