|
Write the application you dream about.
"What Turing gave us for the first time (and without Turing you just couldn't do any of this) is he gave us a way of thinking about and taking seriously and thinking in a disciplined way about phenomena that have, as I like to say, trillions of moving parts.
Until the late 20th century, nobody knew how to take seriously a machine with a trillion moving parts. It's just mind-boggling." Daniel C. Dennett
|
|
|
|
|
This is the hardest thing to do.
|
|
|
|
|
What is the analogy formation in Artificial Intelligence?
|
|
|
|
|
What does this have to do with C#?
Veni, vidi, abiit domum
|
|
|
|
|
"Analogy formation" in artificial intelligence is an inverted gull-wing offensive position where the running-back plays center, and the tight-end does an end-run around metaphor, followed by a hail-Mary lateral pass to the last simile left standing.
"What Turing gave us for the first time (and without Turing you just couldn't do any of this) is he gave us a way of thinking about and taking seriously and thinking in a disciplined way about phenomena that have, as I like to say, trillions of moving parts.
Until the late 20th century, nobody knew how to take seriously a machine with a trillion moving parts. It's just mind-boggling." Daniel C. Dennett
|
|
|
|
|
I bet the OP got even less of that than I did.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
plz.. help me. how to host win form appl in web. i read some blogs,first convert win form application to wpf. then host that wpf in iis.
if it's the process how to convert .
|
|
|
|
|
There is no way but to do some recoding.
WPF can be hosted in IIS as an xbap application.
|
|
|
|
|
Help with what exactly? What have you tried, where are you stuck?
Member 10263519 wrote: first convert win form application to wpf. There's no converters for that, would need to be recoded.
Member 10263519 wrote: then host that wpf in iis. ..looking for an easy way to host a winform in a browser?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi friend
I am creating a com interface , It created , but when i am using it with different platform ,interface is not created within that application.
Please help me where i am wrong.
Code is as follow :
using System;
using System.Runtime.InteropServices;
using System.IO;
using System.Text;
using System.Data.SqlClient;
using System.Net;
namespace SMSApp
{
[Guid("694C1820-04B6-4988-928F-FD858B95C880")]
public interface SendSMSInterface
{
[DispId(1)]
void Init(string userid, string password);
[DispId(2)]
bool ExecuteSelectCommand(string selCommand);
[DispId(3)]
bool NextRow();
[DispId(4)]
void ExecuteNonSelectCommand(string insCommand);
[DispId(5)]
string GetColumnData(int pos);
[DispId(6)]
string sendMessage(string user, string password, string customer, string cardno, string MobileNo, string CreditPt, string DebitPt, string balancept);
[DispId(7)]
string sendSmsFirstTime(string user, string password, string customer, string cardno, string MobileNo, string balancept);
}
[Guid("47C976E0-C208-4740-AC42-41212D3C34F0"),
InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface DBCOM_Events
{
}
[Guid("9E5E5FB2-219D-4ee7-AB27-E4DBED8E123E"),
ClassInterface(ClassInterfaceType.None),
ComSourceInterfaces(typeof(DBCOM_Events))]
public class SendSMS : SendSMSInterface
{
private SqlConnection myConnection = null;
SqlDataReader myReader = null;
public SendSMS()
{
}
public void Init(string userid, string password)
{
try
{
string myConnectString = "user id=" + userid + ";password=" + password +
";Database=NorthWind;Server=SKYWALKER;Connect Timeout=30";
myConnection = new SqlConnection(myConnectString);
myConnection.Open();
}
catch (Exception)
{
}
}
public bool ExecuteSelectCommand(string selCommand)
{
if (myReader != null)
myReader.Close();
SqlCommand myCommand = new SqlCommand(selCommand);
myCommand.Connection = myConnection;
myCommand.ExecuteNonQuery();
myReader = myCommand.ExecuteReader();
return true;
}
public bool NextRow()
{
if (!myReader.Read())
{
myReader.Close();
return false;
}
return true;
}
public string GetColumnData(int pos)
{
Object obj = myReader.GetValue(pos);
if (obj == null) return "";
return obj.ToString();
}
public void ExecuteNonSelectCommand(string insCommand)
{
SqlCommand myCommand = new SqlCommand(insCommand, myConnection);
int retRows = myCommand.ExecuteNonQuery();
}
public string sendMessage(string user, string password, string customer, string cardno, string MobileNo, string CreditPt, string DebitPt, string balancept)
{
UnicodeEncoding unicode = new UnicodeEncoding();
string strUrl = "http://api.mVaayoo.com/mvaayooapi/MessageCompose?user=";
string strUr2 = user + ':' + password;
string strUr3 = "&senderID=ETHOSW&receipientno=";
string strUr4 = MobileNo + "&msgtxt=";
string Strur5 = "Dear " + customer + " , thank u for using ur Club Echo card no. " + cardno + " . " + DebitPt + " Pts dr " + "%26 " + CreditPt + " pts cr to ur card. A/c Bal " + balancept + " pts.";
string finalurl = strUrl + strUr2 + strUr3 + strUr4 + Strur5;
WebRequest request = HttpWebRequest.Create(finalurl);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream s = (Stream)response.GetResponseStream();
StreamReader readStream = new StreamReader(s);
string dataString = readStream.ReadToEnd();
string responsemsg = finalurl;
response.Close();
s.Close();
readStream.Close();
return (responsemsg);
}
public string sendSmsFirstTime(string user, string password, string customer, string cardno, string MobileNo, string balancept)
{
UnicodeEncoding unicode = new UnicodeEncoding();
string strUrl = "http://api.mVaayoo.com/mvaayooapi/MessageCompose?user=";
string strUr2 = user + ':' + password;
string strUr3 = "&senderID=ETHOSW&receipientno=";
string strUr4 = MobileNo + "&msgtxt=";
string Strur5 = "Dear " + customer + " , thank u for shopping with us. Your card no. is " + cardno + " . A/c Bal is " + balancept + " points.";
string finalurl = strUrl + strUr2 + strUr3 + strUr4 + Strur5;
WebRequest request = HttpWebRequest.Create(finalurl);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream s = (Stream)response.GetResponseStream();
StreamReader readStream = new StreamReader(s);
string dataString = readStream.ReadToEnd();
string responsemsg = finalurl;
response.Close();
s.Close();
readStream.Close();
return (responsemsg);
}
|
|
|
|
|
Alright, does the code give you any Errors, Exceptions or warnings?
We can't read your mind, neither access your HDD - You need to be specific and tell us error details.
Rakesh_Ranjan_Godrej wrote: I am creating a com interface
No. There is no COM interface in your sample code, and neither are you using the System.IO.Ports namespace which you'd need to access a COM interface.
Edit: My bad - I thought you were talking about Serial COM Ports
modified 19-Nov-13 4:27am.
|
|
|
|
|
Rakesh_Ranjan_Godrej wrote: interface is not created within that application
What do you want to tell us with that? Is it created somewhere else?!
Tell us what errors you experience and the platforms on which you experience the errors - and also: on which platforms does it work as expected?
|
|
|
|
|
I want to create a dll and use it with CAL Coding using automation variable.
|
|
|
|
|
I don't see anywhere that you are marking these as exposed to com (i.e. ComVisible("true") ). Have you done that elsewhere?
|
|
|
|
|
|
Ah, I see. So, it's registering on the build machine but not when it's running on a different machine. I take it that this is the problem you are facing. When you deploy the code, you need to run the regasm command to actually register your COM interfaces - VS does this for you on your build machine, but you need to do this manually when you run it on another machine. Regasm and it's switches are covered here[^].
|
|
|
|
|
Hi, I have a method that use Microsoft.Office.Interop.Excel class to export a DataTable to a .xls file. Everything is ok untill I got a request that the excel need to have some text rows before displaying the data in DataTable, such like following:
TITLE OF THE EXCEL
Label1 Param1
Label2 Param2
COLUMNHEADER1 COLUMNHEADER2 COLUMNHEADER3
.... .... ......
.... .... ......
.... .... ......
I have tried with DataTable.Merge(...) method but it returned with the COLUMNHEADERS AT THE TOP OF THE EXCEL, like this:
COLUMNHEADER1 COLUMNHEADER2 COLUMNHEADER3
TITLE OF THE EXCEL
Label1 Param1
Label2 Param2
.................. .................. ........................
.................. .................. ........................
.................. .................. ........................
Any suggest is appreciated. Thanks in advance.
|
|
|
|
|
Show us the coe you use now. Otherwise we won't be able to find out how to solve that.
|
|
|
|
|
Hi all,
I have previously worked with Andy Beaulieu's Farseer Helper as a physcis engine for a small Silverlight game.
I am now proposing using a similar conept for a basic class in C# that I am involved in. To my surprise, I realised that Silverlight is not developed anymore, and so, the Farseer physics/Farseer helper combo might not make sense anymore.
Basically, I just need something that is really very easy to start with (it's learning C# that should be the focus; developing a game with objects junping around would be just to make things more fun). Physics Helper was great in that you could work in a WYSIWYG environment and then dig into the code to programmatically add more objects or so. So what I am looking for is something along those lines: easy to learn is better than powerful here.
Any thoughts? (I have looked through the C# forum here without result). I have also done seraches on the net but it's hard to judge what kind of game engine would be easy to use and not discontinued.
The game engine should also be free or perhaps shareware, so that the students can use it from home and the institution maybe pay a fee.
Thanks for any hints!
petter
|
|
|
|
|
|
Thanks, but I hesitate, as it's not developed anymore (as Silverlight). Thanks anyway!
...
Actually I took a look at it anyway. It seems very simpleand there are many templates to start out with. Perhaps this can be the winner after all, since the objective is just to get the students hooked on game programming, using OO principles.
modified 19-Nov-13 5:56am.
|
|
|
|
|
I'd skip XNA (also not being actively developed).
This is what I've used to program some simulations: Unity3d[^]
Its scripting is all done in C# (or many other languages), can be ported to IOS, Android, Web, etc without changing code, and the free version is pretty damn good.
|
|
|
|
|
Hi,
Thanks a lot. I have already signed up in the Unity community to see if it is something for my particular situation.
It still might be a bit too much, but I'll download the free version and try it out!
Thanks again.
|
|
|
|
|
If you want to leverage the knowledge that's available in the XNA world, you could always look into MonoGame (it's free, and actively developed). Plus, it works on other platforms as well.
|
|
|
|
|
Thanks, took a look at it. Right now I am considering Unity, but it might be too large.
|
|
|
|