Syndicate content

Pages with category Web Server

  • PAD File Module for Drupal

    Introduction

    You can find my PAD File module on Drupal.

    It is intended for any company and individual that has executable files for download but its customers and potential customers. The PAD File describes the content of such executable to the target machine (robots that spider the Internet for PAD Files).

    With the module you can create, import, update and delete PAD Files as necessary. It automatically generates the XML files and maintains them on your website without you having to do anything about it.

    It is also intended ...

  • With Drupal, it is possible to have many sites defined in many different ways.

    These are the things you can have in your URL that Drupal will understand and use to configure your site. The configuration file is called settings.php and will reside in a folder of which the name is determined using the URL used to access the site.

    1. Fully qualified domain name

    2. Port

    3. Path withing the website

    Sites are expected to be found under the 'sites' folder found in the same directory as the index.php file.

  • See attachment at the bottom for sample code that fails in different versions of PHP 5.2.x

    Today a customer told me that his pages disappeared on his Drupal site.

    I looked into it and after a few hours determined that a module was the cause. Then I looked in the module and the only part I could see that could possibly be wrong was the preg_replace_callback() call.

    So I got the input data from one of my customer pages and run the PCRE against it in an interactive version of PHP. That gave me the same result: nothing.

    The expression started with (?:<p.*?>)?\[ and it used the /s ...

  • I use all sorts of tricks in order to duplicate functionality without actually duplicating PHP code.

    One of the main, easiest way under Unix is to create softlinks. First put all your code in one folder, then create a softlink to it. That gives you two paths:

  • Today I helped a customer get a PECL extension going. The first error I was getting was as follow:

    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/http.so' - /usr/lib64/php/modules/http.so: cannot open shared object file: No such file or directory in Unknown on line 0

    Obviously the extension was not yet installed... I run pear install pecl/pecl_http in order to get it to work, which it did after I installed the C compiler, the curl header files, and a few other things.

    After a few minutes, I got the message:

    install ok: ...

  • When you use a PostgreSQL database, it gets vacuumed every night (by default on most systems, verify on yours, it may not be the case...) This is a quite simple process to make sure that the database remains fast. And it works great, also. You can have millions of entries and it remains very fast (they have real good algorithms to auto-generate index files as required by your repetitive queries.)

    The problem is that tables are being grown for 24h and then they get cleaned up. They can then grow again for 24h. If you don't clean up, the tables continue to grow, fast. Up to the point where ...

  • I've been trying to send a POST to Apache 2.x using cURL. In itself, that's very easy to do. However, I run modsecurity and when cURL sends a POST that's too large, it actually decides to break the transfer down using an Expect: 100-continue header. That in itself sound good.

    Some people said that you could override the Expect by adding the curl option to add a header like this:

      curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));

    This sounds all nice, however, it only removes the header from the request, it does not prevent the errors with modsecurity. Not only that, the curl header

  • I wanted to dynamically manage the attributes of the HTML tag. As I'm working on the Snap! C++ system, I thought that should be done with the standard XSLT feature: <xsl:attribute-set name="...">. Unfortunately the the XQuery implementation does not currently support such, at all.

    There is a way, though, to still make it work with a central template definition which can be used to decide what should be and what should not be added to the HTML tag.  Especially, in this way we can make use of one template that is a system defined template. This being said, if you use ...

  • After about 2 hours of search, I finally got it. All the docs were telling me do this:

    	var f = document.getElementById('myform');
    	f.action = url;
    	f.submit;
    				

    And it did not work. I was getting an error. So thinking that this 'action' is an attribute I used f.setAttribute('action', url);. And that worked great with Sea Monkey, FireFox, etc. but one day we tried under Internet Explorer. That one was not working somehow. Reading some notes on the net, indeed, setAttribute('action', url)is no good under Internet Explorer. But f.action = url;generates an error?!

    After ...

  • When I create a new DigitalOcean droplet I have to run a few commands that I don't otherwise use very much at all so I was thinking that adding them here would make it easier to remember.

    First if you setup an SSH key on DigitalOcean before you create the servlet, then you will be able to access the server root account with SSH.

    ssh -l root -i <path-to-key> <ip-address>

    IMPORTANT NOTE: Although you will have access with an SSH key, the system will ask you for a root password if you use the wrong key. So make sure to use the -i option if you have multiple keys and the one ...

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.

  • cc
    The Unix C compiler. This is an old language that started the frenzy of advanced C, C++ and C# languages. Many other languages are also based on C such as PHP, Java and Javascript.
  • cmake
  • number

    All software make use of numbers. Everything is a number. The most basic number in a computer is 0 or 1. This is called a bit. These are represented with electricity. Although in most cases we see it as 0 - Ground and 1 - Voltage (i.e. 1 volt), the bit representation in software and in hardware may be interpreted either way (i.e. a 0 could mean that the voltage is 1V and not 0V.)

    Combining these zeroes and ones we offer end users to handle much larger numbers. With 8 bits, you can have numbers from 0 to 255 (unsigned) or -128 to +127 (signed.) Now a day, computers can handle a much larger number of bits in one cycle. Most processors use 64 bits but they can calculate numbers on 128, 256, and for some 1024 bits at once. Also with parallelism, the size can be viewed as even larger (i.e. handling a 64 bit number in 1,536 threads like on my old nVidra Quadro 600 is equivalent to one large number of 98,304 bits! That would be 2 power 98,304 possibilitie or about 2.8359e+29592 in decimal.)

    Integers are easy to handle. Although when working on math problems you generally see the set of avaialble numbers as equivalent to N although mathematicians know that computers can really only handle a limited set of numbers. For example, on a 64 bit computer, the usual range is -9223372036854775808 to 9223372036854775807, This is generally enough although at times some equations have to be reworked to avoid really large or small intermediate numbers that work fine in math equations, but not so well on computers.

    Now, math also includes other sets of numbers such as D, R, and C. Computers do not offer any way to represent numbers in R or C but they can offer D to some extend. These numbers are called floating point numbers because we do math using an exponent. The exponent makes the decimal point "float" in any location as the number used for the exponent offers. Using a 64 bit floating point, you can have positive and negative numbers with precision varing betwee 10-308 and 10+308. This includes a positive zero (+0) and a negative zero (-0), which is import in a few cases (although +0 = -0 is true, you can get the sign of a number and distinguish both zeroes). Note that at first decimal numbers were going to also have a positive and negative zero, but it was instead decided to have one more negative number (remember, with 8 bits we have signed numbers from -128 to +127, this is because in the positive numbers we have a 0 which we don't have in the negative numbers.)

  • source
  • tab