|
:(i trying to make a project to get the total 65 in table of 7x7 in multidimentional array. i want to get awnser 65 in all the ways horiaental or vertical.plz help me make it in vb or viual c++.
thanx
QASIM MASUD
|
|
|
|
|
We have C++ and VB forums here, why did you ask this in the C# forum ?
This smells like homework - we don't do people's homework for them ( although we will gladly help if you ask questions and post code when you get stuck )
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
He probably thought C# was half way between C++ and VB.NET
"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
|
|
|
|
|
A hospital has a large no. of registered physicians . Atteributes of PHISIACIAN include Physician_ID (the identifier ) and Specialy.patients r admitted to the hospital by physicians. Attributes of PATIENTS include patient_ID (the identifier) & Patient_Name. Any patient who admitted must have exactly one admitting physician . a physician may optionally admitted any no. of patients. Once admitted, a given patient must b treated by at least 1 physician a particular physician may treat any no. of patients , or may not treat any patients. Whoever a patient is treated by a physician, the hospital wishes to record the details of the treatment (treatment_detail). Components of treatments_detail include date, time and results.
QASIM
|
|
|
|
|
Very interesting. Is there a question you wish to ask also? Or did you just want to tell us about your database?
"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
|
|
|
|
|
------------------------------------
| 65 | 0 | 0 | 0 | 0 | 0 | 0 |
|----+----+----+----+----+----+----|
| 0 | 0 | 0 | 0 | 65 | 0 | 0 |
|----+----+----+----+----+----+----|
| 0 | 65 | 0 | 0 | 0 | 0 | 0 |
|----+----+----+----+----+----+----|
| 0 | 0 | 0 | 0 | 0 | 65 | 0 |
|----+----+----+----+----+----+----|
| 0 | 0 | 65 | 0 | 0 | 0 | 0 |
|----+----+----+----+----+----+----|
| 0 | 0 | 0 | 0 | 0 | 0 | 65 |
|----+----+----+----+----+----+----|
| 0 | 0 | 0 | 65 | 0 | 0 | 0 |
------------------------------------
Code is left as an exercise for the reader.
--
I've killed again, haven't I?
|
|
|
|
|
Hi..
I want to use the CmdLoadFromResource() method of ths speech SDK 5.1 to make the xml file that includes the Grammar embeded but i dont know how to use this method in C#.
This code shows how i used this method:
[System.Runtime.InteropServices.DllImport("kernel32")]
private static extern long LoadLibrary(string lpLibFileName);
private void button2_Click(object sender, System.EventArgs e)
{
this.objRecoContext = new SpSharedRecoContext();
this.objRecoContext.Recognition += new _ISpeechRecoContextEvents_RecognitionEventHandler(RecoContext_Recognition);
this.objRecoContext.State=SpeechRecoContextState.SRCS_Enabled;
grammar = objRecoContext.CreateGrammar(0);
int hModule=Convert.ToInt32(LoadLibrary("ReviewWinApp.dll"));
int langID=409;
grammar.CmdLoadFromResource(hModule,"tryRecog.xml","CFGGRAMMAR",langID,SpeechLoadOption.SLODynamic);
grammar.State=SpeechGrammarState.SGSEnabled;
grammar.CmdSetRuleIdState(1,SpeechRuleState.SGDSActive);
}
When i click this button i got the error:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in ReviewWinApp.exe
Additional information: The specified resource type cannot be found in the image file.
I am not good in COM programming.Could any one give me a C# code sample for using this method?
|
|
|
|
|
Hey Peeps! I recently d/l a program which does exactly what I need it to do, but it is a little loose for what I want because it allows you to see it running in the notification area.
What this little program does is disable the X to close a window on programs that you specify. And in the Command Window, it disables Close from the system menu also. This is perfect, but the program is always in the notification area and anyone can access it.
Does anybody know how to come to the same result...what command could be used to do this? is it a registry trick?
Thanx in advance!
Jude
|
|
|
|
|
You handle the OnClosing event, and the event args passed in include a flag you can set to stop the app from closing.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
How do you access the event from another program...such as a command window?
Jude
|
|
|
|
|
You can't.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Why not goto Sysinternals and download their free FileMonitor and their free RegistryMonitor applications.
Run these programs then run that program you are interested in and you will be presented with an awful lot of data that tells you what files and registry entries are being queried etc.
Then eventully you will find entries of interest. Then you might want to create your own program that does similar things but according to your own "tastes" etc...
Just ideas for you
modified 1-Aug-19 21:02pm.
|
|
|
|
|
The link can't be found...thanx if you can get it to me
Jude
|
|
|
|
|
|
I didn't understand your question very well, but if you only want to disable the Close button on your C# form, just add this property to your Form:
class MyForm : Form
{
...
protected override CreateParams CreateParams
{
get
{
CreateParams createParams = base.CreateParams;
createParams.ClassStyle |= 0x200;
return createParams;
}
}
...
} I hope this helps!
Luis Alonso Ramos
Intelectix
Chihuahua, Mexico Not much here: My CP Blog!
|
|
|
|
|
Thanx for the reply, but I am trying to prevent a certain program that runs in a command window to be closed.
Jude
|
|
|
|
|
hi i m new to C#.net.i m using winsock controll for network programming. the following code does not work.
private void axWinsock1_DataArrival(object sender, AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent e)
{
Bytes[] msg=new Bytes[20];
axWinsock1.GetData(msg,msg.length);
}
but it gives error that cannot parameter to refer object how to do that i mean where refer object comes into scene.
later i used the first variable as string but still give error.
Tasleem Arif
|
|
|
|
|
Hello, I have this next code, which works, but when I open the .xml file it doesn't show me the type I want, it shows me "System.Type" or "AnyType"...
DColSFirst.DataType = TypeCode.String.GetType();
also:
DColSID.DataType = Type.GetType("System.UInt32"); //works either...
How can I define the DataColumn to a type I want?
|
|
|
|
|
Hi folks, does anyone know where I can find a guide / tutorial on measuring internet / network traffic?
Cheers,
Ben.
|
|
|
|
|
|
Not quite, but it did point me in the right direction, thanks
|
|
|
|
|
I have a need to display data with a DataGridView that is expandable in both dimensions. In other words, the user may want to add both extra rows and extra columns. To do this I am currently just copying my data from a strongly typed list of object (that also contain another strongly typed list of their own - i.e. the second dimension) to a DataTable and add some methods for inserting new columns and then copy everything back again when I'm done. It's not the most elegant solution, but it does work. I was wonder though if there is a better solution using a custom collection class. Does anybody have any suggestions? Is there a way to get the DataGridView to bind a collection of custom objects that themselves contain another collection class?
|
|
|
|
|
Hi all I have two problems ist one is that I have stored a string in ArrayList using split function (i.e one word per index). now the problem is that this ArrayList contains white spaces wich is creating problems as well. whereas i have already removed the white spaces from the string
2ndly i want to convert an ArrayList into a string. not an array of strings but a single string...
looking forward to ur help
Regards,
-- modified at 13:53 Tuesday 9th May, 2006
|
|
|
|
|
friend this may resolve, ur first problem..
<br />
private void parseString(String x)<br />
{<br />
string tempstr;<br />
int i=0,len,flag=0;<br />
tempstr="";<br />
<br />
len=x.Length;<br />
while(i < len)<br />
{<br />
if(x[i]!= ' ')<br />
{<br />
tempstr = tempstr + x[i];<br />
flag = 0;<br />
}<br />
else<br />
{<br />
if(flag == 0)<br />
{<br />
str.Add(tempstr);<br />
tempstr = "";<br />
flag = 1;<br />
index++;<br />
}<br />
<br />
}<br />
i++;<br />
}<br />
str.Add(tempstr);<br />
<br />
}
In this str is arraylist
If u have still some doubt, mail me
ShivaJee
|
|
|
|
|
In .NET 2.0 you can use the StringSplitOptions.RemoveEmptyEntries with the String.Split function. Otherwise when you load up your ArrayList just check if the strings contain only white space:
if (myString.Trim()="")
To convert back to a string can't you just iterate through the ArrayList and add each entry to a string, or even a StringBuilder?
-- modified at 16:53 Tuesday 9th May, 2006
|
|
|
|