1. Double-buffered Panels in C#

    Having panels which update quickly without flickering requires double-buffering. To accomplish this in C#, you'll have to derive from the standard Panel class as shown below, and then replace the declaration and instantiation of the panel with your new class.

    using System.Windows.Forms;
    
    namespace WindowsFormsApplication1
    {
        public class DoubleBufferedPanel : Panel …
    read more
  2. Setting Outlook to Display Plain Text Email

    Although definitely not the only step to stopping malicious email, not displaying HTML or rich text in messages goes a long way. Here's the summary of where the settings are located:

    Outlook 2003

    Tools menu, Options, Preferences tab, E-mail area, E-mail Options, Message Handling area.

    Outlook 2007

    Tools menu, Trust …

    read more
  3. Useful One-Line PHP files

    Here are a couple useful PHP commands that you can run on your server to get useful information.

    This one gives basic information about the PHP installation, which can be used for troubleshooting or just verifying that PHP is running.

    <?php phpinfo(); ?>
    

    This one tells you the name of the …

    read more
  4. PHP Equal-Sign Operators

    Reading some php code, you might get confused about the difference betweeen =, ==, and === (this single, double, and triple equal signs). Here's a quick summary.

    = (Assignment) Just like in (pretty much) every other programming language.

    == (Equality) Returns true if the two variables have the same value.

    === (Identity) Returns true if the …

    read more
  5. Debuggers as Pesticides

    I thought this was funny:

    Historical footnote: DDT was developed at MIT for the PDP-1 computer in 1961. At that time DDT stood for "DEC Debugging Tape". Since then, the idea of an on-line debugging program has propagated throughout the computer industry. DDT programs are now available for all DEC …

    read more
  6. Matlab Primes to File

    The MATLAB script below will export 10000 primes to a file named 'primes.txt':

    x=primes(10000); % Insert your own value here
    fopen('primes.txt','w+'); % Insert the file name heref
    printf(ans, '%d\n',x); % Prints a new line between each prime (C-style formatting)
    fclose all;
    
    read more

« Page 2 / 3 »

links

social