.net

Is there a good free wavelet library for .NET?

Fast is good and support for wide range of wavelet families is also good. ...

config sqlcachedependency

i know SqlCacheDependency could push the modified data from db to the Cache, i want to know if the I could config the sqlcachedependency not push the modified data immediately, but push every 1 minute. ...

Monitor.Wait, Pulse - When worker thread should conditionally behave as an actual worker thread

My particular scenario: - Main thread starts a worker thread. - Main thread needs to block itself until either worker thread is completed (yeah funny) or worker thread itself informs main thread to go on Alright, so what I did in main thread: wokerThread.Start(lockObj); lock(lockObj) Monitor.Wait(lockObj); Somewhere in worker thread...

How to access COM vtable and acess its entries from TLB(Type Library) in C#?

Hello, I need to access COM vtable which have entries of those functions which are exposed to outside world under some specific interface in C#. I've accessed and iterate over the types enclosed in the TLB with LoadTypeLib and playing with ITypeInfo. Now only thing I need to access one by one those methods inside vtable of COM Interfac...

Why use buffers to read/write Streams

Following reading various questions on reading and writing Streams, all the various answers define something like this as the correct way to do it: private void CopyStream(Stream input, Stream output) { byte[] buffer = new byte[16 * 1024]; int read; while ((read = input.Read(buffer, 0, buffer.Length)) > 0) { output.Wri...

Not able to select a Font file from Windows Fonts folder using OpenFileDialog

I am trying to use the .NET Windows Form OpenFileDialog control to select a font file (not a font as you would with the FontDialog), but the dialog will not allow a mouse click to select a file in the C:\WINDOWS\Font directory. Any ideas for choosing a font file ...

C#.NET Problem with locking of page after writing stream to window.

The code below works fine, the problem is the 1st two lines are appearing on screen. It basically loads the PDF but I can't see the btnAcceptProposal change name or become enabled. Tried a Thread for the load but it broke. Anyone got any ideas - it's a web application protected void btnPDFProposal_Click(object sender, EventArgs e) { ...

Calculate QuaterlyHour from Given two DateTimes in c#

I want to calculate the quarter Hour from the given two datetimes: Suppose datetime1 and datetime2 , i am doing somewhat like this : int d = datetime2.Subtract(datetime1).Hours; double l = Math.Round(Convert.ToDouble(d/4)); but if the QuarterHour is 3 (ie d=3), whats the good way to show the output- should it be zero or the round o...

How to get all supported CultureInfos of an ResourceManager instance?

Hi, I want to retrieve all the supported CultureInfos of an ResourceManager instance so I can give the user a feedback which languages are supported. Am I missing something or is there no easy way to retrieve such a list? ...

Passing integer lists in a sql query, best practices

I'm currently looking at ways to pass lists of integers in a SQL query, and try to decide which of them is best in which situation, what are the benefots of each, and what are the pitfalls, what should be avoided :) Right now I know of 3 ways that we currently use in our application. 1) Table valued parameter: Create a new Table Valued...

.NET Remoting switching channels by itself.

Hi. We are having an odd problem with .NET Remoting. Basically, we have a server which registers two TcpChannels with ChannelServices.RegisterChannel(): one listens on port 50000, the other one listens on port 15000. We then have a client that registers a TcpChannel to be able to communicate with the server. We retrieve a an object from...

Are there ways to improve NHibernate's performance regarding entity instantiation?

Hi folks, while profiling NHibernate with NHProf I noticed that a lot of time is spend for entity building or at least spend outside the query duration (database roundtrip). The project I'm currently working on prefetches some static data (which goes into the 2nd level cache) at application start. There are about 3000 rows in the result...

AJAX CascadingDropDown ViewState Problem

Question: How do I maintain both the contents (from queries) and selected value of both dropdowns after postback? Source Code: Download my source code from this link (link now works). Just add a reference to your AjaxControlToolkit User Action: Select a value from each dropdown. Click Submit. After Postback: StatesDrop: (Selected va...

What is the difference between Invoking and BeginInvoking a MessageBox?

In a form, compare BeginInvoke (new Action (() => { MessageBox.Show ()); })); with Invoke (new Action (() => { MessageBox.Show ()); })); What is the difference, and when should I use one over the other? How is the behavior affected by the message pump of the MessageBox? I did some testing and found that both methods block ...

ServiceController.Stop() doesn't appear to be stopping anything

My dev box is a Windows 7 (x64) machine. I've got some code (C#, .net 2.0) that in certain circumstances, checks to see if a service is running and then stops it. ServiceController matchedService = //My Service! //If statements and such matchedService.Stop(); matchedService.WaitForStatus(ServiceControllerStatus.Stopped); Now, I can...

active directory monitoring

I want to develop a monitoring tool to monitor active directory like (solar wind,op manager etc). For this purpose,I have chosen Zabbix(an open source tool) to monitor AD and provide me real time values so that i can plot those results on my Front-end. To monitor any process/service by zabbix, i need to provide its complete path to zabbi...

C# / Silverlight: SL classlibrary referenced in "normal" C# - application, must Silverlight be installed?

So, I want to share TONS of code between Silverlight and "normal" applications. Starting with utility functions and all that up to my hand coded framework (MVC, DI, etc...)... Here is my question: Imagine I have put all this stuff into a SL - Classlibrary, lets call it "AmazingLibrary" and I reference it in a NORMAL (say, WPF) project ...

Please suggest ASP.Net source editor

Can someone suggest an ASP.NET source code editor control that I can integrate into my web site? Expected features: Highlight ASP.NET source code, including server-side code, JavaScript, html, CSS Intelligent suggesting when typing the code (a la intellisense). Design View is not required. ...

Report.NET TableLayoutManager example needed

Hi all Has anyone used the Report.NET library from http://report.sourceforge.net/ to create PDF documents? There is no example code for the TableLayoutManager and the API is confusing the hell out of me. Can anyone point me to some example code? Thanks David ...

Silverlight data-driven application with NHibernate

Hi Guys, this is more of a subjective Question, but I'll ask it anyway. I'm about to develop a very data-centric application that has to run inside the browser. The frontend will be Silverlight, backed by a Fluent NHibernate service that runs server side. The problem here is: Wherever I look for data-driven silverlight app I wind up fi...