|
Ennis Ray Lynch, Jr. wrote: Also, you may consider c++ if you just need speed.
I'm not sure how much that would help though. The filesystem would still be the bottleneck in performance.
|
|
|
|
|
You can use memory mapping in C++ which will reduce the bottle neck for speed.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
what is it you want to do?
the question was: "I want to read a very large files"
I told you how to read without memory problem.
Now it can't read faster than you!
Had the question be: "I am looking for a particular pattern" I might have added an automated search function.....
But if you want to read it all, you've got to do it man!
|
|
|
|
|
I have a loop to send aysn message to different clients as below.
but even if all the clients are online and the configuration of all the clients are the same, I can only received a part of responses from clients.
Would you pls give me some suggestion about this problem?Thank you
code below------------------------------------------------------------------
foreach (IPEndPoint endPoint in this.endPoints)
{
try{
udpClient = new UdpClient();
udpClient.Connect(endPoint);
udpClient.Send(buf, length);
udpClient.BeginReceive(new AsyncCallback(ReceiveCallback), new UdpState(udpClient, endPoint));
}
catch (Exception ex){
}
----------------------------------------------------------------------------
Sincerely,
WeiYu Wang
|
|
|
|
|
Hi,
i am using a windows DateTimepicker. When i click the up/down arrow button when the control is not having focus, it increments the value first and then sets the focus to control. If i want to do some validation before value changes, what event i should be handling? Basicall what i want is if the user click the up down arrow button, i want the mins field to increment instead of hours field. Format for my datetime picker is hh:mm:ss. By default the focus is on the hour field, i want the mins field to have focus.
any idea?
venkat
|
|
|
|
|
Have you tried the ValueChanged event
|
|
|
|
|
i cannot do on value change because if the user himself changes the focus to hour field and then increments, value change should increment the hour. I just want to set the default field to increment as mins. ValueChanged event happens after the value has been changed, so i don't want to revert back. If the focus is not in the control, user clicks the updown button, it should change the min field instead of hour but if the control has focus and user has selected hour field it should change hour. I just want to change the default from hour to mins.
|
|
|
|
|
I'm working on some in-house software to calibrate a product. I've written code with MS Visual Studio Express C# on my PC, running XP and Office 2000. It uses "System.Runtime.InteropServices" and Excel and Office bits to communicate with Excel. It works fine.
When I come to try it out on the PC that will be used, there's an error about Interop being the wrong version when installing. That PC is also running XP, but has Office XP. I downloaded some runtime Interop for Orfice 2003, and XP, but they didn't make any difference. Do I need the targe systems version of Office to make an application that will install and run?
|
|
|
|
|
Hello, I have setup a timer to simulate cursor blinking. My program has multiple threads. the thing is that my timer went off but it never calls the function delegate to the Tick events.
Do you what is reason? why the tick event nevers calls the function to do my blinking?
private System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer();
timer.Tick += new EventHandler(BlinkMode);
timer.Interval = 150;
timer.Enabled = true;
//=============================================================
// timer tick handler
//=============================================================
private void BlinkMode(Object obj, EventArgs ea)
{
if (!BlinkCursor)
{
if (curX < 19) // Don't show the cursor if it's at the end of the line
{
DrawChar('_', curX, curY); // Draw an underscore char at the current coordinate
BlinkCursor = true;
}
}
else
{
DrawChar(HiddenChar, curX, curY);
BlinkCursor = false;
}
}
Donkaiser
|
|
|
|
|
You must start the timer.
timer.Start();
|
|
|
|
|
timer.Enable starts the timer
|
|
|
|
|
Hello,
I think when you are multi threading, you have to use System.Timers.Timer Class.
With Timer.Elabsed Event.
All the best,
Martin
|
|
|
|
|
Try to put your code in method BlinkMode in try catch.
If you get an exception, then you have a problem with the other thread.
Use this to avoid exception :
private void Blinking()
{
}
private void BlinkMode(Object obj, EventArgs ea)
{
MethodInvoker mi = new MethodInvoker(Blinking);
Invoke(mi);
}
|
|
|
|
|
I just want to be more specific about what im doing. Im developping with CF 2.0 VS 2005 and C#.
I have a class library which simulate a VT100 like terminal, and i added it as reference to my project. From my main project i call a method from that added class library. In this method, I process all the data that need to be printed on the terminal screen and then i set the timer like the code above which will trigger the BlinkMode method. while debugging, I can see that my timer went off but nothing from the BlinkMode() works.
Donkaiser
|
|
|
|
|
well after the timer got fired, BlinkMode() never been called. that why it's weird. I see what you waant me to do but if the BlinkMode() never get called so do the Blinkinh().
Donkaiser
|
|
|
|
|
Ok,
Then you have an other threading problem.
I think you have to invoke the Method which you are calling from your main project.
Feel free to ask for a sample code.
All the best,
Martin
|
|
|
|
|
public void Blinking() //Is this the Method which is called from your main project?
{
//Have you tried to invoke this Method?
Timer.Tick+=......
}
private void BlinkMode(Object obj, EventArgs ea)
{
//
}
|
|
|
|
|
no they are locally called in my terminal.
But I guess I solved the problem by setting up the timer inside the constructor. I guess setting up the timer inside a function it's not working.
Donkaiser
|
|
|
|
|
Some one can explain how to use Layer with Windows Forms ?
Or maybe there is some example ...
Thanks.
|
|
|
|
|
What do u mean by Layers?
Pramod
|
|
|
|
|
For example - i have 2 control that need to be on same position.
I know that i can define some layer that will hold the first control - and some other layer that will hold on the second control.
I can marge them both , see each of then in separate.
I don't know how to define/use this feature....and i need help
|
|
|
|
|
|
I realy dont know where to find some help ....
|
|
|
|
|
I'm new to Active Directory and Directory services and thought I try something simple to begin with. I have the following code:
using System;
using System.Collections;
using System.DirectoryServices;
namespace ConsoleApplication1
{
///
/// Summary description for Class1.
///
class Class1
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
DirectoryEntry de = new DirectoryEntry();
Console.WriteLine(de.Path);
DirectoryEntries des = de.Children;
foreach(DirectoryEntry entry in des)
{
Console.WriteLine(" Child: " + entry.Name);
}
}
}
}
which sometimes generates the required output and other time gives me the following error:-
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in system.directoryservices.dll
Additional Information: The specified domain either does not exist or could not be contacted.
Has anyone any clues as to what is causing this intermittent error and how to fix it.
|
|
|
|
|
Hello,
You have to set the Path Property by yourself.
For this reason you can use the Constructor with string Parameter.
string path = @"C:\";
DirectoryEntry de = new DirectoryEntry(path);
All the best,
Martin
|
|
|
|