|
I should have mentioned...
1) They don't want to use Google. Cost prohibitive
2) This will probably all be in a WPF app. The LAT/LONG data will come from truck mounted GPS devices, and I will need to convert to addresses and store in SQL.
I've been Googling GeoCode Service and what would be nice is a .Net API I can use.
If it's not broken, fix it until it is
|
|
|
|
|
A lot of countries have addresses mapped to lat/long - if you can source this data locally, then you can save yourself some of the cost. For instance, here in the UK, we have the Ordnance Survey which takes care of a lot of this for us - combined with information from local councils.
|
|
|
|
|
Ok, I have no clue what all that means
If it's not broken, fix it until it is
|
|
|
|
|
You might get some traction with this[^].
|
|
|
|
|
I understand what Geocoding is. I don't understand how to code it. Again, I'm hoping for an API or other service that I can get started with.
If it's not broken, fix it until it is
|
|
|
|
|
You didn't look down the page, did you? And it's reverse geocoding that you're looking for, not geocoding. The link I posted shows the details of web service calls you can make to get the results. All you need to do is call into the service - I would opt for the json version if I were doing this.
|
|
|
|
|
So it is a cost thing!
Back in the old day - 2001 and in the UK again we could get postcode/geo info on CD from one of the mapping companies, it did cost but was reasonable. Postcodes in the UK represent as few as 6 houses.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
hi there !
i have BAD DATA EXP !
MY APP WORK FINE IN LOCAL BUT WHEN I RUN IT IN THE NETWORK THE SERVER APP THROW THE BAD DATA EXP !?
CODE : C#
CLIENT :
public byte[] ENC(string strdata, CspParameters prk)
{
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(prk);
byte[] data = rsa.Encrypt(Encoding.Unicode.GetBytes(strdata),false);
MessageBox.Show(data.Length.ToString()); return data;
}
void clint(byte[] data)
{
try
{
object op = (object)data;
BinaryFormatter br = new BinaryFormatter();
TcpClient myclient = new TcpClient("192.168.43.152", 7000);
NetworkStream myns = myclient.GetStream();
br.Serialize(myns, op);
myclient.Close();
}
catch (Exception e)
{
clint(data);
}
}
/////////////////
.
.
.
CspParameters cp = new CspParameters();
cp.KeyContainerName = "25522100";
string usb = ":RIO";
string Name = System.Environment.MachineName;
Name += usb;
mymsg = ENC(Name, cp);
clint(mymsg);
SERVER :
<pre> mytcp = new TcpListener(7000);
mytcp.Start();
mysocket = mytcp.AcceptSocket();
myns = new NetworkStream(mysocket);
BinaryFormatter br = new BinaryFormatter();
object op;
op = br.Deserialize(myns);
data = (byte[])op;
MessageBox.Show(data.Length.ToString());
CspParameters cp = new CspParameters();
cp.KeyContainerName = "25522100";
byte[] messge = DEC(data, cp);
//////////////////////
.
.
.
public byte[] DEC(byte[] en_data, CspParameters key)
{
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(key);
byte[] data1 = rsa.Decrypt(en_data, false);
return data1;
}
ANY HELP !
modified 7-Oct-13 12:35pm.
|
|
|
|
|
DON'T SHOUT
The IP-address is of a computer in local network; it will not be available on the internetz. You'll need to figure out your public IP and adjust the router to point to that specific server.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
its LAN network
there is server run windows server 2008
and pc run windows 7
thnx for ur help
|
|
|
|
|
|
Add some logging on the server side to find out where the exception gets thrown, and which data caused it.
|
|
|
|
|
|
Hi,
I am trying to send some text to notepad using SendKeys.Send("Hello World!") instead SendKeys.SendWait("Hello World!"). But I could not send and facing problem.
Error is:
"SendKeys cannot run inside this application because the application is not handling Windows messages. Either change the application to handle messages, or use the SendKeys.SendWait method."
Thank you
namespace Send_Key
{
class Program
{
[DllImport("user32.dll", SetLastError = true, EntryPoint = "FindWindow", CharSet = CharSet.Auto)]
static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll", SetLastError = true, EntryPoint = "SetForegroundWindow")]
static extern bool SetForegroundWindow(IntPtr hWnd);
[DllImport("user32.dll", SetLastError = true, EntryPoint = "ShowWindow")]
static extern bool ShowWindow(IntPtr hWnd, int cmCommand);
static IntPtr hwnd;
static void Main(string[] args)
{
Process notePad = new Process();
notePad.StartInfo.FileName = "notepad.exe";
notePad.Start();
System.Threading.Thread.Sleep(1000);
SetForegroundWindow(hWnd);
System.Threading.Thread.Sleep(1000);
SendKeys.Send("Hello World!");
}
}
}
modified 7-Oct-13 5:14am.
|
|
|
|
|
You are not setting NotePad as the ForegroundWindow correctly. Try:
SetForegroundWindow(notePad.MainWindowHandle);
Google CEO, Erich Schmidt: "I keep asking for a product called Serendipity. This product would have access to everything ever written or recorded, know everything the user ever worked on and saved to his or her personal hard drive, and know a whole lot about the user's tastes, friends and predilections." 2004, USA Today interview
modified 7-Oct-13 16:04pm.
|
|
|
|
|
Your Thread.Sleep lines can be removed. You don't need them. Also, the numbers you have in there are just arbitrary and make certain assumptions about the performance if the system.
A better way to wait for Notepad to launch is:
notePad.WaitForInputIdle();
|
|
|
|
|
I have the byte array of my mp4 video, how can I play it without saving to my laptop/hard disk?
Thanks.
|
|
|
|
|
You can embed Windows media player in your code and open the audio URL via the player.
Note that the file will still be temporarily cached to your hard drive.
|
|
|
|
|
A few months ago, I wrote an article about dynamically loading classes at runtime:
The "Rule-O-Nator" - An example of dynamically loading classes at runtime[^]
For me, it was eye opening when Darek Danielewski gently asked, "Hey did you know about this thing called MEF?" DOE!!! Time to teach this old dog new tricks....
Since then, I've spent considerable time banging my head on my desk and getting over the hurdles. Almost all of the examples are extremely simplistic, copies of MS Calculator example, and not much time is spent talking about using MEF in the real world. I ultimately wrote a wrapper to make it easier to plug MEF into existing applications and to simplify a few things like composition, managing the catalog and container, diagnostics and debugging, avoiding pitfalls when using MEF in threads, etc.
Do you think there's any intrest for a .Net MEF wrapper, and an article about it on codeproject?
Would it be better to post the wrapper as a separate article and then smaller posts on using the wrapper vs a single article?
I'm also looking for some sanity checks. Would someone like to review the wrapper?
Look forward to to your thoughts and suggestions.
Best,
-james
-james
"If you've got to make code changes in something you didn't write, tread lightly. Your predecessor was regarded as either a genius or a moron. The truth most likely lies somewhere in the middle..."
|
|
|
|
|
As you know, I really liked the Rule-O-Nator article, and I'd definitely like to see an article on MEF by you.
thanks, Bill
Google CEO, Erich Schmidt: "I keep asking for a product called Serendipity. This product would have access to everything ever written or recorded, know everything the user ever worked on and saved to his or her personal hard drive, and know a whole lot about the user's tastes, friends and predilections." 2004, USA Today interview
|
|
|
|
|
Hey Bill! Thanks for the vote of confidence.
-james
"If you've got to make code changes in something you didn't write, tread lightly. Your predecessor was regarded as either a genius or a moron. The truth most likely lies somewhere in the middle..."
|
|
|
|
|
Article Please!!
Keep Clam And Proofread
--
√(-1) 23 ∑ π...
And it was delicious.
|
|
|
|
|
Hey Brisingr,
Thanks for the input!
-james
"If you've got to make code changes in something you didn't write, tread lightly. Your predecessor was regarded as either a genius or a moron. The truth most likely lies somewhere in the middle..."
|
|
|
|
|
Definitely do the article please, then push out as many real world examples as you are willing to publish.
I find real world examples so much more useful, it may not be relevant to our problem but it allows us to see how a problem was solved.
Never underestimate the power of human stupidity
RAH
|
|
|
|