|
How can i send file from computer A to computer B
|
|
|
|
|
Windows Sockets...
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
You must learn network programming for this.
TcpListener,TcpClient,Socket,NetworkStream Classes defined for network programming in Visual C#
This classes in System.Net.Sockets namespace.
|
|
|
|
|
I'm writing a program that does a lot of heavy computing. I eventually want this program to run as a screen saver. But because of all the heavy computer the program does, after a few minutes of running, the fan turns on - wasting energy and making noise, two things a screen saver shouldn't do.
So far I've tried various ways of putting the current thread to sleep for some time, to give the computer a rest, but I haven't had very much succes. Is there a better way to slow down my program or as least (safely) manage it so the fan doesn't come on?
Thanks,
Drausin
|
|
|
|
|
Fan? Which Fan?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
I think he means the fan on his processor - you know, the thing that cools it down and stops it from overheating.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
|
|
|
|
|
You could try modifying your process priority. I don't know if this will reduce the absolute processor load or if it's just relative to other processes...
Regards,
mav
|
|
|
|
|
You can try System.Threading.Thread.CurrentThread.Sleep(somemillisecondsvalue); in your working loop...
Merry Christmas!
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
Yea, I ended up doing that - putting a sleep function into my loop (as opposed to on a separate thread w/ a timer), and it seemed to work pretty well.
Thanks everyone,
Drausin
|
|
|
|
|
Hello all,
I am reading different types of files from DB & Storing at perticular place.
My code is as follows...
<br />
FileStream fs = new FileStream(sFileName, FileMode.Create, FileAccess.Write);<br />
BinaryWriter bw = new BinaryWriter(fs);<br />
<br />
bw.Write(buffer);<br />
bw.Flush();<br />
<br />
bw.Close();<br />
fs.Close();
This is code is not writing proper data only in case of .sql files
Why .sql not writing properly, anybody help me. If there is any alternate in C# inform me.
regards
GV Ramana
|
|
|
|
|
Might be useful if you described what you mean when you say :
Gali Ramana wrote: sql not writing properly
what are yu expecting? What are you getting?
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
|
|
|
|
|
I have a service in a remote system that has a fixed port number.
Does any body has a simple code how to check if service is running using C#
Any help will be greatly appreiated
|
|
|
|
|
I think the best way is to just try to connect. If the Sevice is listening then the connect will succeed else it will fail. If it fails, Service is not running.
Hope this helps...
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
Hi
I have been working with C# for the past few years and I am currently looking for another C# position. My current job involves working with the C# language and a large API. Thus I haven’t had too much exposure to some of the key areas of .NET.
So I am trying to identify a few key areas to study in preparation for interviews. Hopefully with the help of CodeProject articles
I am thinking about looking at:
- Brushing up on C# - boxing and a few other intricacies
- Web Services
- ADO.NET
- Perhaps looking at studing for some MCP Exams. Any one have any opinions on them? Worth while?
Any suggestions on key areas and resource would be much appreciated.
Cheers
Rich
|
|
|
|
|
One thing to think about for certification is that they are releasing new certifications for develops next year based on .NET 2.0. For these certs, they are separating out people that do websites from window development from enterprise architects. So you will have to decide if you want to take exams based on .NET 1.1 or 2.0.
I would say to look at ADO.NET.
Steve Maier, MCSD MCAD
|
|
|
|
|
If you'd like to take a test that may identify some weaknesses, then the C# Fundamentals and C# tests from BrainBench have no cost. They might help pinpoint some areas of C# that you could then study.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
DataSet DS = new DataSet();
foreach(string Q in Query)
{
string Error="";
DataTable DT = RunQuery(DSNName,Q,out Error);
if(DT==null)
DT = new DataTable();
DT.ExtendedProperties.Add("Query",Q);
DT.ExtendedProperties.Add("Error",Error);
DS.Tables.Add(DT);
}
retXml = DS.GetXml();
StreamWriter SW = new StreamWriter("c:\\temp\\PreXml.txt",false);
SW.Write(retXml);
SW.Close();
In the above code I iterate through a string array of queries and populate Datatables and their ExtendedProperties. But when I then write the XML to a file, I cannot find anything about the ExtendedProperties within the XML. I've also tried to load the XMl back into a DataSet, but again no ExtendedProperties are there. Any help or suggestions ?
|
|
|
|
|
This may sound like a dumb question, but how do I set an icon for a program I just made. I've already put the icon on the upper left menu on the form window, but I don't know how to set the icon for the program itself (like what you click to open it). Whenever I search I only find information on the control box icon.
I'm sure its super easy and I'm just not finding it (using C# 2005 EE).
|
|
|
|
|
It should be available by right clicking your project (the exe) and then selecting properties. This should open a nice window with some options for you. In the tab 'Application' you will find 'Resources'. Here you can set the icon file for the application.
|
|
|
|
|
Does anyone know how to allow a user to change the password in an MS Access database? My connection string (at least the path and password) is set programatically, read in from an encrypted file when the application loads, but I need to enable to user to change both the path and password for the database if necessary. Selecting the path is easy enough, but I'm not sure how to reset the password. Any help would be appreciated. Thanks.
|
|
|
|
|
not sure about this, but its probably not a good idea to use direct sql/access passwords for logging into a database.
a better approach might be to have a default login with public access. and then have a table with user names and password combination.
at the login screen, a query (using the default login) is done of that user table, and if a successful match is found then they are allowed to enter the application (with all queryies being run with the default access login).
changeing passwords would then be fairly simple, it would only be change to the table that holds all your users.
as far as tracking changes to rows, a unique session id can be created when a user logs in, and this ID can be used to track changes of data (like if someone decides to save somethign in the data base, the session id would be inserted with the row, and that session id would like to a user name)
not sure about best practices, but this approach seems resonable. not sure about concurrency issues with access when it comes to using a single username and password to log into a database for multiple users....
|
|
|
|
|
Hi everybody,
I use database oracle8i, and use System.Data.OracleClient to connect db, but when i insert, updat data, It can't save unicode font.
Do you what is problem? how to fix it?
Thanks!
xyz
|
|
|
|
|
You're cross-posting in multiple forums, which is a sin, but in this case, your second post was more clear that your first.
Font's don't get saved with string data, unless their descriptions are part of the string, like HTML. You'd have to serialize the font that your data is in, then save that data in a seperate column(s) of your table.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is there a way to compile an application so that the files included in the application folder cannot be delelted unless the user uninstalls the program? Or, at least, is there a way to protect certain files from being deleted that may be essential to the program's operation?
|
|
|
|
|
My idea would be to NTFS file permissions on those files that need protecting. Set it up so that only the administrator has delete privs. All others would have read and execute?
How to do this from code you would need to do some googling.
|
|
|
|