Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

ACorbs

@ACorbs
About
Posts
39
Topics
14
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Swamped by 500s again
    A ACorbs

    God yes

    The Lounge com help question

  • Hey all, i have a bit of a problem with event handlers...
    A ACorbs

    If I am reading you correctly, then the answer is yes. ((MainClass) this.ParentForm).MyEvent += new ...

    C# help question

  • Article Scoring
    A ACorbs

    I was wondering if anyone had considered changing the weighting of votes to take into account how an individual votes. What I mean is this: For each article a person votes on... First calculate the standard deviation of the votes on an article. Determine how many standard deviations away their vote is (decimal number) Then add that number into an average from other articles they voted on This average distance from the mean vote (in standard deviations) would then affect the weight of their next vote. This solves a lot of problems. People who like to vote low or high to "move" the current score to what they think it should be loose the ability to do so. In addition, on the rare occasion that someone likes to give everyone "1"s their voting power is also diminished. I think it would encourage people to vote the score they think something should get rather then trying to "move" the score to what they think it should be. Now, there are a few more things involved with this. Each person's average difference from the mean vote (in standard deviations) would need to be recalculated before they vote again. If they are the second person to vote for something and the scores go as follows: 5, 2,1,1,2,2 Then without the recalculation there voting power is diminished when it clearly should not be. This also raises the issue of re-scoring everything they ever voted for when their voting power changes. I don’t think it is necessary to re-score everything, but I really don't care. Also, if someone wants to get fancy and add statistical error calculations, for things with very few votes, it couldn't hurt. Well, that's it. I know it is a lot to ask, but as long as there is a rewrite in the works I thought I should put it out there.:-D

    Site Bugs / Suggestions help

  • gdi+ slow
    A ACorbs

    Just some FYI: If you are graphing a series of point as a continuous line make sure to use the DrawLines function and not DrawLine in a loop. I found a huge performance difference between the two when I was writing a graphing control. I don’t know if you are already doing this, but I thought I might mention it in case you’re not.

    C# graphics game-dev question winforms hardware

  • Some New Ideas
    A ACorbs

    The irony is the US buys a lot of its uranium from Canada. I still hear stories in my family about a cabin on a lake my great grandparents owned in Canada. At night some of the rock pilings around the lake would have a slight glow to them. There are a lot of natural resources in Canada.

    The Back Room com testing beta-testing help question

  • Some New Ideas
    A ACorbs

    Concerning spent fuel rods... We know what to do with them, but there is no hurry. Their not going anywhere and the solution does not breed hydrogen. That’s why this design lost the bid for the next generation nuclear reactors. However, this ‘technology’ will still be around once we find a better way to extract hydrogen. I still think this technology needs more attention; as far as I know it does not have the funding to build a full reactor. All tests were done using controlled heating elements that replicate the heat given off by spent fuel. http://www.caesar.umd.edu/ If you want something to be angry about, look at research spending in the US. In the past 30 years Biology related research has gone up exponentially, while other fields funding rates are almost flat. People want to live longer, and the cost is a slowing speed of scientific development for the rest of society. If people want to live to see the marvels of the future, they need to fund them.

    The Back Room com testing beta-testing help question

  • Threading Problem
    A ACorbs

    I guess I thought Join(500) would kill the thread after 500ms. I must have misread that somewhere.

    C# help data-structures

  • Threading Problem
    A ACorbs

    I am attempting to write a command queue. It is important that each command is executed in order (FIFO). This command queue will be running functions that will have to interact with controls using Control.Invoke. The problem I am having has to do with threading and is harder to describe then to show. Code Follows:

    public struct CommandContainer
    {
    	public System.Delegate method;
    	public object\[\] parameters;
    }
    

    CommandQueue.cs -------------------------

    using System;
    using System.Threading;
    using System.Windows.Forms;

    namespace CommandQueue
    {

    public delegate void CommandFunction();
    /// /// Summary description for CommandQueue.
    /// 
    public class CommandQueue:System.Collections.Queue
    {
    
    	private ManualResetEvent m\_ManualResetEvent;
    
    	public CommandQueue()
    	{
    		//m\_ManualResetEvent = new ManualResetEvent(true);
    	}
    
    	public override void Clear()
    	{
    		lock(this.SyncRoot)
    		{
    			// TODO:  Add CommandQueue.Clear implementation
    			base.Clear ();
    		}
    	}
    
    	public override object Dequeue()
    	{
    		lock(this.SyncRoot)
    		{
    			// TODO:  Add CommandQueue.Dequeue implementation
    			return base.Dequeue ();
    		}
    	}
    
    	public override object Peek()
    	{
    		lock(this.SyncRoot)
    		{
    			// TODO:  Add CommandQueue.Peek implementation
    			return base.Peek ();
    		}
    	}
    
    	public override void Enqueue(object obj)
    	{
    		lock(this.SyncRoot)
    		{
    			if(obj is CommandContainer)
    			{
    				base.Enqueue (obj);
    			} 
    			else
    			{
    				//TODO: Provide error code here
    			}
    		}
    	}
    
    	public void Enqueue(CommandFunction target)
    	{
    		lock(this.SyncRoot)
    		{
    			CommandContainer t\_CommandContainer;
    			t\_CommandContainer.method = target;
    			t\_CommandContainer.parameters = null;
    			base.Enqueue (t\_CommandContainer);
    		}
    	}
    
    	public void Enqueue(System.Delegate method, object\[\] parameters)
    	{
    		lock(this.SyncRoot)
    		{
    			CommandContainer t\_CommandContainer;
    			t\_CommandContainer.method = method;
    			t\_CommandContainer.parameters = parameters;
    			base.Enqueue (t\_CommandContainer);
    		}
    	}
    
    	/// /// Executes all commands in the que
    	/// 
    	public void Flush()
    	{
    			Thread t\_FlushThread = new Thread(new ThreadStart(FlushThreadStart));
    		t\_FlushThread.Name = "Flush Thread";
    			t\_FlushThread.Start();
    			t\_FlushThread.Join();
    	}
    
    	private void FlushThreadStart()
    	{
    		lock(this.SyncRoot)
    		{
    
    C# help data-structures

  • News taskforce
    A ACorbs

    What would be involved and what sort if news should go up front? Upcoming Microsoft Chats perhaps?

    Site Bugs / Suggestions announcement business question

  • Changing Files Security Properties with C#
    A ACorbs

    Well, you really should use .Net 2.0. However, if you really want to everything can be found in this online book. http://pluralsight.com/wiki/default.aspx/Keith.GuideBook.HomePage

    C# csharp dotnet com sysadmin windows-admin

  • AutoScale
    A ACorbs

    I would love to see some decent information on AutoScale as it pertains to control and program authoring. An article that covers .Net 1.0 through 2.0 would be ideal. Also some sort of tool that could execute programs to display as if using a different DPI setting would make testing a lot easier. I know this is a lot to ask, but there seems to be a lack of information on this out there, and testing requires restarting!

    Article Writing csharp testing beta-testing

  • Memory optimisation
    A ACorbs

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/fastmanagedcode.asp?frame=true&hidetoc=true http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/dotnetgcbasics.asp

    C# data-structures performance tutorial

  • draw on transparent control over a mediaplayer
    A ACorbs

    http://www.vivantlabs.com/Controls/BoxControl.zip This project has a control and a form showing it in use. This should help you do what you want.

    C# graphics help question career

  • draw on transparent control over a mediaplayer
    A ACorbs

    With this set: CreateParams cp=base.CreateParams; cp.ExStyle|=0x00000020; //WS_EX_TRANSPARENT You need to determine when to redraw the control. Windows will not let you know. Other then a timer constantly repainting you controls, I see only one .Net way. Remove your CreateParams for the control and use a custom shape to do what you want. Simply create a control that is a box with no center. I will try to upload an example in a few.

    C# graphics help question career

  • Reflection and overriding
    A ACorbs

    Thanks, I'll give it a shot. You wouldn't happen to know the proc cost of these?

    C# help

  • Equal rights for VB users - our own tab now!
    A ACorbs

    I agree, in the past I have had to use VB so that other non C# programmers could edit and update what I wrote. I think VB does need more of a presence here at CP.

    Site Bugs / Suggestions

  • Chat Room
    A ACorbs

    I don’t know if this has been suggested, but a chat room would be nice. Either some .Net custom thing or an irc channel for the site would be fine. There is defiantly enough talent to automate administration of such a chat room.

    Site Bugs / Suggestions csharp lounge

  • James Earl Jones 2008
    A ACorbs

    Yes, the ultimate solution to all our problems. I propose we write in James Earl Jones for president in 2008. After all, who can’t help but agree with everything he says. Besides, what better way to ensure national security then, electing Darth Vader president? (Note: Hail to the Chief will be replaced by the imperial theme.):laugh: P.S. Yes, this is a joke.

    The Back Room security help question

  • Reflection and overriding
    A ACorbs

    Here is the problem, I have an abstract class that has a public property (type = bool). When setting the Property = true, I need to make sure two virtual functions, in the class, were overridden. I don’t want to make them abstract because they don’t usually need to be overridden. So, I looked for some way to use reflection to do this, but I haven’t made much headway. Any help is greatly appreciated.

    C# help

  • override WndProc, Native?
    A ACorbs

    I was wondering if overriding the WinProc function is still considered “Native” .Net. I always avoid using it, but I have a situation where I must catch a message not supported by the .Net framework. It looks like mono is trying to support this function, but their new site is so hard to navigate, who can tell. (Or they dumped a lot of content from their site!?) protected override void WndProc(ref Message m) { base.WndProc (ref m); ...Code Here... } Thanks

    IT & Infrastructure csharp c++ dotnet question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups