Syndicate content
  • Copying an entire partition to another when both are not of the exact same size (in blocks) can be tricky, especially if that partition includes special files such as /dev/hda and FIFOs.1

    Yet, there are several ways to do so:

    • 1. Note that was the case especially in the 90's. As of today, things have come a long way and there are command line options one can use with the cp and tar instructions to copy pretty much anything. You will still have problems with some files such as locks, though. But you should not have to copy them!
  • When moving a database from one computer to another, you've got to copy all the data.

    For PostgreSQL, there is a pair of functions named pg_dump and pg_restore.

    In most cases that works great, however, some systems may create things such as additional functions that will NOT make it across. I do not know how to get that to work (and maybe it works in newer version of PostgreSQL?)

    In any event, in most cases the following commands are enough (I used them with Drupal websites and since they stopped using some of the definitions they have in the system.install file used on initialization, ...

  • Of Note: This only applies to C99, not C++.

    I learned something quite interesting today and wanted to keep a note of it.

    Whenever I use a printf() with a format such as %ld and try to compile my code on "many" different platforms, I often get warnings on another one.

    The fact is that an int, a long, a long long, an int32_t, int64_t all use a different combination depending on your platform and whether you're running in 32 or 64 bit.

    So, the answer to this problem are the #define found in the inttypes.h header file:

    PRId8
    PRId16
    PRId32
    PRId64
    

    These entries are used after

  • MS-Access defines many different types, including a newer one called DECIMAL.

    You are supposed to be able to create tables with the DECIMAL type. So a statement such as:

       CREATE TABLE MyTbl (decimal_test DECIMAL(20, 5))
    

    should work. Right?

    I have been using CurrentDb.Execute for a while and that statement was causing the Execute function to return an error saying that the field definition was erronous (Syntax error in field definition, to be exact).

    The trick is very simple!

  • LVM today can create a mirror of your data without having the need for mdraid (or hardware raid).

    Problem is, I did not find any documentation that makes sense and there doesn't seem to be a graphical interface that can help you with that (at least not under Ubuntu Gnome.)

    So... I decided to spend the time because that's probably less time anyway than trying to create and maintain and md device.

    The fact is, it is rather simple, but requires quite a bit of knowledge.

    Copying the Partitions Exactly

    First, I wanted the partitions to be exactly the same and using fdisk did not ...

  • As I am now using git, I like to create my own repositories. In most cases the documentation is not that easy to follow. Here are the instructions I use.

    First of all, I setup my own personal configuration (it can be used as a global setup for you). This is written in the ~/.getconfig and looks like this:

    [user]
        name = AlexisWilke
        email = me@my-top-secret-email-address.com
    
    [core]
        excludesfile = ~/.gitignore
    [push]
        default = simple
    [giggle]
        main-window-maximized = false
        main-window-geometry = 1114x789+144+184
        file-view-vpane-position = 389
        ...
  • I have been wondering, for a while, how the triggers where generated in Drupal. I know that one can catch a message by writing a hook function and you have hundreds of those available. However, how are the triggers working?!

    The fact is that triggers require you to write a function. The Core Trigger module has a set of specialized functions for the Core modules and it is limited to that. In other words, you cannot expect new modules to simply define an array and get the triggers to work (I was really wondering how could that really work?!)

    [toc hidden:1]
  • Today I finally found out how to fix the path of the forums.

    The name of the vocabulary is "Forums". To access it as expected in pathauto, you use [vocab-raw].

    The result of [vocab-raw] is "forums" (all lowercase.)

    Then, by default, pathauto adds the list of categories to the path. This is done using the [catpath-raw]. Say you have a forum named "Linux Stuff", [catpath-raw] will return "Linux Stuff" as is. This makes sense because paths on Linux are case sensitive (actually, it's the same thing with Apache wherever you are using it, although it's a

  • I run a few Drupal website and once per hour I run the cron.php script. I do it only once per hour because nothing changes so often on my websites so it would require faster refreshes.

    Once in a while (relatively rarely now) I get a list of errors from CRON saying that the checks failed. The errors look something like this:

    HTTP/1.0 302 Found
    Location: /cgi-bin/ipdiags.ha
    Pragma: no-cache
    Content-Type: text/html
    
    <html><meta http-equiv=Refresh content=0;url=/cgi-bin/ipdiags.ha>
    <body></body></html>
    

    As you can see, this is a 302 so a temporary error. ...

  • In Ubuntu 16.04, I wanted to add a user cron file with crontab -e, which has a new behavior: the very first time, it asks you what editor you want to use (i.e. nano, vim, ...)

    If you choose the wrong one, then next time it does not ask you, it remembers your choice forever, so you'll be stuck.

    The nano editor is okay, but difficult to work with if you're used to something like vim.

    The data actually gets saved in a hidden file of your home directory named .selected_editor.

    # Generated by /usr/bin/select-editor
    SELECTED_EDITOR="/usr/bin/vim"

    Mine was set to ...

Syndicate content

Diverse Realty

Diverse Realty Team

Want a New Home?
Want to Sell Your House?

Call Alex at
+1 (916)
220 6482

Alexis Wilke, Realtor
Salesperson
Lic. # 02024063

Cory Marcus, Broker
Lic. # 01079165

     

Terms of Site Index

Find the page/content you are looking for with our index.

  • ChangeDisplaySettings
    Function used to change the display settings under MS-Windows.
  • datasheet
  • factorial
  • HTTPS

    Hyper Text Transfer Protocol Secure—The protocol used by browsers to communicate to web servers securely. The security is done with similarly to SSH. The transfer uses FTP like commands, but only one connection. Since HTTP 1.1 it is also possible to reuse the same connection for multiple files (pages, images, videos, etc.)

  • sensors