|
I suggest reading this[^] or search for other articles on generics.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
i am devloping the application in which i m recieving the sms from the mobilei m devloping application in c# anybody can help me.
|
|
|
|
|
The way to receive SMS, is to be connected to the mobile phone network, and have a phone number. Have you accepted this job from a project site, or have you just decided to do it, without doing any research in to feasibility ?
There are libraries for sending SMS via paid gateways, I don't see how you can receive SMS on a computer that is not connected to the phone network. How can it be addressed to you if you don't have a number ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i have done all the task ,it is sending the message but not receiving the message i have written the following event for receiving but it is not working
private void oGsmModem_NewMessageReceived(ATSMS.NewMessageReceivedEventArgs e)
{
txtMsg.Text = "Message from " + e.MSISDN + ". Message - " + e.TextMessage + System.Environment.NewLine;
}
|
|
|
|
|
It is possible that the event never get triggered.
What is connected to your computer in order to receive/send messages?
I am using a GSM modem where i can use only AT commands. There is an AT command available that pass me an event when a message is received.
Provide more information about your project.
|
|
|
|
|
Hi All.
I have a problem in my Web Page.
I Want reload data from DataBase after 15 seconds to WebPage. otherwise, my page must update new data from database to page after 15 seconds. But I don't know How do it?, I must use AJAX ?. How to Create above Page?.
I very need to sovel this problem as soon as.
Hope you help me.
If you have source code, you can show me.
thanks.
|
|
|
|
|
Not really a C# question but I'll help anyway.
You need to add a META tag inside that page's HEAD section. For example:
This little snippet will reload CodeProject.com every 15 seconds.
|
|
|
|
|
But in WebPage have using <marquee> tag to scroll page.
I want reload data in page at time, then position of all records in page not change <-- because page load then setting all position of records.
Example:
time A:
Position records.
Record 1
Record 2
Record 3
....
time B: <--- at time update data.
Record 2
Record 3
....
if using javaScript -- meta --> Position Record of B is.
time B:
Position records.
Record 1
Record 2
Record 3
....
|
|
|
|
|
You can use javascript timer and submit the page after 15 second and on page load you can update the data. not need to use ajax.
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
But in WebPage have using <marquee> tag to scroll page.
I want reload data in page at time, then position of all records in page not change <-- because page load then setting all position of records.
Example:
time A:
Position records.
Record 1
Record 2
Record 3
....
time B: <--- at time update data.
Record 2
Record 3
....
if using javaScript -- meta --> Position Record of B is.
time B:
Position records.
Record 1
Record 2
Record 3
....
|
|
|
|
|
From the docs the definition of Math.Round
The integer nearest a. If a is halfway between two integers, one of which is even and the other odd, then the even number is returned.
So 4.5 rounds to 4 and 3.5 rounds to 4. Why?
|
|
|
|
|
Because it uses the Banker's Rounding algorithm to do the rounding. It's overrideable so you can use your own round method(s).
|
|
|
|
|
|
I learned banker's rounding in High school, so it just seems natural to me. Check out this[^].
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Hello:
I have here a problem where I am using web services.
From this example you can see that webservices is very tolerant of extra fields or missing fields. One issue though is that if you run one of the webservices and then update the other project's web reference it generates partial class code for your remote object in the namespace of the webservice. This is a problem.
For instance:
If you run the solution Version1 and then open the solution
Version2 and update the Web Reference in the project (you have to show hidden files) you get a file called Reference.cs.
In Reference.cs the system generates a wrapper for the class Foo
/// <remarks>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml","2.0.50727.1378")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
public partial class Foo {...}
The problem is that when it does this it will return this object as when you call HelloWorld.
static void Main(string[] args)
{
ConsoleApplication1.localhost.Service1 s1 = new Service1();
MyLibrary.Foo f1 = new MyLibrary.Foo();
f1.Prop1 = "New";
MyLibrary.Foo f2 = (MyLibrary.Foo)s1.HelloWorld( f1);
System.Console.WriteLine("F1.Prop1=" + f2.Prop1);
}
Which is not what you want. The intended object is MyLibrary.Foo not ConsoleApplication1.localhost.Foo. Please figure out how prevent VS from creating the wrapper or any other solution.
Below are the project codes:
"Version1" Solution:
Webservices:
using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Xml;
using System.Xml.Serialization;
using MyLibrary.Lib;
namespace Version1
{
///
/// Summary description for Service1
///
[WebService(Namespace = "http://localhost/")]
[ToolboxItem(false)]
public class Service1 : System.Web.Services.WebService
{
[WebMethod(EnableSession = true)]
[XmlInclude(typeof(Foo))]
public MyLibrary.Lib.FooHelloWorld(MyLibrary.Lib.Foo foo1)
{
foo1 = "Updated";
return foo1;
}
}
}
"MyLibrary.cs"
using System;
using System.Data;
using System.Configuration;
using System.Xml;
using System.Xml.Serialization;
namespace MyLibrary
{
public class Foo
{
private string m_prop1 = null;
public string Prop1
{
get { return m_prop1; }
set { m_prop1 = value; }
}
private string m_prop2 = null;
public string Prop2
{
get { return m_prop2; }
set { m_prop2 = value; }
}
public Foo()
{
m_prop1 = "abc";
m_prop2 = "cde";
}
}
}
Console application: "Program.cs"
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using MyLibrary.Lib;
namespace ConsoleApplication1
{
static void Main(string[] args)
{
ConsoleApplication1.localhost.Service1 s1 = new Service1();
MyLibrary.Foo f1 = new MyLibrary.Foo();
f1.Prop1 = "New";
MyLibrary.Foo f2 = (MyLibrary.Foo)s1.HelloWorld( f1);
System.Console.WriteLine("F1.Prop1=" + f2.Prop1);
}
}
*** NOte *** localhost is the name of the web services when i add reference.
If you can provide solution in this Version1 solution it will work also on Version2 solution.
Hope anyone can save me from hell... Thanks
|
|
|
|
|
How to make a random number generate? And also, every time it is called, will it generate a new random number? (between 1 and 20, please). Thanks in advance.
|
|
|
|
|
|
It will do what you tell it to.
When I use a Random I prefer to make one static instance that I use throughout the program.
private static readonly System.Random randy = new System.Random() ;
To get a random number in the range 1 -- 20:
int x = randy.Next ( 20 ) + 1 ;
|
|
|
|
|
|
Every day, you post questions that show you have no resources on C#, and are scared to use google. We love to help, but you're never going to learn to code unless you learn how to do basic research, and invest in at least one good book.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Trust me, I do invest in books, but it's not the same as a person telling you directly and so on, not that the site is the same either... The books are things that can't explain it to you if you don't understand what it says, though they usually do help.
|
|
|
|
|
Then use that book, to whack yourself on the head if for nothing else.
If you want to learn from a live person take a class.
|
|
|
|
|
PIEBALDconsult wrote: If you want to learn from a live person take a class.
Yep. Like the people in my class I teach
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
Well, I taught myself entirely from books, so my advice would be to grab a more basic book to start with. I sure did.
Contrary to what you may think, people here are not trying to take a shot at you, but it is frustrating to see so many people ask the most trivial questions, over and over, it really does make us wonder if anyone does any research at all. We want to help you, I'm giving you advice that I think is the best help I can offer.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Listen to what Christian has to say. He made it to MVP and started out by reading a couple of books. He's living proof that books do work.
|
|
|
|