1. 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
  2. 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 ...

    read more
  3. Run Wireshark as non-root user

    I frequently get frustrated when Wireshark won't run as a non-root user due to permissions on the dumpcap process. Here's the fix:

    sudo groupadd wireshark
    sudo usermod -a -G wireshark $USER
    sudo chgrp wireshark /usr/bin/dumpcap
    sudo chmod 754 /usr/bin/dumpcap
    sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN ...
    read more
  4. TOP (Linux Program) CPU States

    The Unix/Linux program "top" is used to determine various information about processes your computer is executing. It is comparable to the "ps" command, but I prefer using top. It a good equivalent of the Task Manager on Windows, but much more powerful and customizable, if you're comfortable with ...

    read more

« Page 2 / 3 »

blogroll

social