66 links
  • Ban's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
2 results tagged trick x
  • How to blacklist a Linux kernel module using a boot parameter, AKA how to blacklist a module from Grub

    "Sometimes it may be necessary to blacklist a module to prevent it from being loaded automatically by the kernel and udev. One reason could be that a particular module causes problems with your hardware. The kernel also sometimes lists two different drivers for the same device. This can cause the device to not work correctly if the drivers conflict or if the wrong driver is loaded first.

    You can blacklist a module using the following syntax: module_name.blacklist=yes."

    August 25, 2014 at 14:38:27 GMT+2 * - permalink -
    QRCode
    - https://www.debian.org/releases/stable/i386/ch05s03.html.en#module-blacklist
    linux kernel trick module blacklist
  • Why You Should Use Class Static Rather Than Globals in PHP
    • many forget global variables are fully global, not only to the current file;
    • declaration outside any other scope in the file doesn't necessarily mean the variable will be global, e.g. if the current file is included from a non-root scope. The only completely reliable way to declare a global is to use $GLOBALS;
    • fully global variables are generally a bad idea anyway.

    Instead, if you need a similar feature, look at class (or function) static variables.

    • they have the expected scope;
    • support access restriction (private, protected, public);
    • can be referenced from the using class with the better syntax self::$my_class_global.

    If you don't have a class… well, first check if your code couldn't get better organized by being in one. If not, either create a state class (abstract class MyState { static $foo = 0; }) and use it as a global, or know what you do and use a global, with all its attached baggage.

    March 22, 2014 at 18:03:42 GMT+1 * - permalink -
    QRCode
    - http://php.net/manual/en/language.variables.scope.php
    php dev web style trick
Links per page: 20 50 100
Shaarli - The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community - Help/documentation