|
Then you have to use an external source. As you are behind a firewall or router, you can't see the external IP address unless you send something outside of your local net.
www.whatismyip.com[^] is one of the pages that will show your external ip address.
If your router has an adminitrator interface, you can see the external IP adress there.
---
b { font-weight: normal; }
|
|
|
|
|
What I have done in the past is write a webservice that I host somewhere outside my network, and have my application call it.
Once in the webservice, it's trivial to find the IP from the caller (your network IP as seen from outside of it).
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
|
|
|
|
|
|
There are so many articles on this site I have no idea what to exactly look for. Here's my scenario...
I need to read approx. 15,000 files in a program and do extensive calculations on each file. Running the job single threadded will take many hours. I was considering a multithreadding application. I thought one way to accomplish this was to run the program by processing something like 10 files at a time using threads.
How could I accomplish this? If you could tell me or point me to one of these hundreds of articles, I'd certainly appreciate it.
|
|
|
|
|
What you want is a ThreadPool . By default it handles up to 25 Threads for you, but you can change the number. But don't use too many threads at a time or the thread switiching overhead will be greater than the performance you might gain by using many threads.
Check this example over at MSDN.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thank you very much for the reply, and even more so for how quickly you did. I'll give this a shot.
|
|
|
|
|
You're welcome!
modified 12-Sep-18 21:01pm.
|
|
|
|
|
jakehn wrote: How could I accomplish this
If you are processing these files on a single cpu machine you can gain some performance at reading and writing these files.
Use three threads.
thread A - Continues reading files for buffer purposes.
thread B - Continues processing of files provided by thread A
thread C - Continues writing of files processed by thread B
If you have a multi cpu system at hand you could increase the number of processing threads to gain perfomance.
Backdraft
|
|
|
|
|
I want to create an application where is one Access database.
In this database there is table called customers.
I've made Crystal Report called CrystalReport1. When I start the program
it asks me for user name and password, server name and database name.
|
|
|
|
|
Can anybody give some ideas how to write a code for joystick coz i'm completely have no idea My supervisor asked me write a code for a joystick which can control the movements of a car. It must has a different level of accelerations to go forward and it also can turn left or right.He also mentioned that the best way to write the code is using c programme rather than assembly language,which i believe he's right and I'm using the 8051 microcontroller.
Thanks!
|
|
|
|
|
|
If you cannot get Windows and DirectX run on a 8051, C# is the wrong language for the problem.
CodeProject is about writing software for Windows, you have to ask somewhere else.
|
|
|
|
|
Hi. I'm a C# beginner and I am writing text to a file, but the reciever of the file wants it to be encoded in ISO/IEC 8859-1. I was earlier using System.IO.Streamwriter but I dont know how to do this with that class. Does anybody know hoe to do this in C#.Net
Robert
|
|
|
|
|
System.Text.Encoding.GetEncoding("iso-8859-1");
Check out the documentation for the Encoding class in the VS 2005 help.
|
|
|
|
|
I haven't done it myself yet, but you might try this:
StreamWriter text = new StreamWriter("test.txt", false, Encoding.GetEncoding("iso-8859-1"));
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Yes, thanks. It's working now!
|
|
|
|
|
I have a windows application that I like to look a little more interesting. How would I go about applying a skin to it?
Thanks
Wacky waving inflateable arm flailing tube man!
- Family Guy
|
|
|
|
|
i want to load values from database(MS Access) into combo box..thank you.
|
|
|
|
|
Not much to it.
1) Make a connection to the database
2) Query from the table holding the values you want in combobox
3) Iterate through the query results and add into combobox.
Plenty of code examples on this site to help.
PJC
|
|
|
|
|
hi!
just an option in the step 3 of your suggestion, you can also use the DataSource property of the combobox and pass a datatable or a dataview.
microsoc
|
|
|
|
|
microsoc,
Thanks for that suggestion. Totally forgot about DataSource being another way of populating the combobox :->
Paul
|
|
|
|
|
Then do it!
modified 12-Sep-18 21:01pm.
|
|
|
|
|
How do I get a list of all of the tables in a MySql database?
Wacky waving inflateable arm flailing tube man!
- Family Guy
|
|
|
|
|
Have you read this?
Personally, I'm not a fan of ODBC and prefer ADO.NET.
I'm sure a search of Google would turn up other options.
Regards
Wayne Phipps
____________
Time is the greatest teacher... unfortunately, it kills all of its students
View my Blog
|
|
|
|
|
Hi,
Is there any way in SharpDevelop to not have XP visual styles enabled?
Regardless of wether or not i use Application.EnableVisualStyles(), the textboxes and comboboxes in the program i am working on still have the xp look.
Thanks
|
|
|
|