The Linux Page

time

.change() not working right in Internet Explorer

I had a problem with jQuery and was wondering what could be wrong. Looking around for a solution, it was clear that Internet Explorer is the problem. Not the other way around (As usual.) The thing is that the function works, just not in realtime.

So... I have a Terms and Conditions flag, when you click it, I want to enable the Submit button in the form (by default the button is disabled.)

So I have a function something like this:

var valid = function check_valid() {
  // compute valid
  var valid = ...;
  // assume valid === true if button should be enabled
  ...

Comment spam attack from 109.230.213.100

Network connections

This morning I was attacked by a robot. I quickly noticed that my websites were slow and saw a pretty large amount of traffic on port 80: 208 connections!

tcp        0      0 192.168.1.1:80          109.230.213.100:65413   ESTABLISHED
tcp      441      0 192.168.1.1:80          109.230.213.100:65445   ESTABLISHED
tcp        0      0 192.168.1.1:80          109.230.213.100:65071   TIME_WAIT 
tcp        0      0 192.168.1.1:80          109.230.213.100:65279   TIME_WAIT 
tcp      497      0 192.168.1.1:80          109.230.213.100:49326   ESTABLISHED
tcp ...

Epson 1260 (and others) and Linux

As I started using my Epson 1260 Photo scanner on my Linux box, I got some problems...

The first scan works perfectly, and then on the second and following weird colors start appearing. Usually it is red or green, some sort of a gradient. At times half the page is like that, at times more, at times it's like a gradient...

Searching, some people said that the iscan driver was bad. Not true. The driver works perfectly.

Not too sure where the problem really is, looks like the buffer used to read the data is not correctly cleared before we read the next image. That is, in the video tool I ...

C printf(3) for int, long and long long that works every time

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

The Expression On Load you entered as the event property setting produced the following error: User-defined type not defined

Problem

A few days ago, I made many updates in one of the MS-Access forms I'm working on.

Then, when I tried to open the form I'd get this error...

The Expression On Load you entered as the event property setting produced the following error: User-defined type not defined

This doesn't mean anything to me since I did not define any type... Removing the Form_Load function (commenting it out) made that very error go away, however, since that's the sub-form of another form, it still generates errors when the main form is trying to initialize the sub-form.

Note that it ...

Upgrade from Ubuntu 9.10 to 10.04

Today I did an upgrade of a server from 9.10 to 10.04. We were on a server version before upgrading to 9.10 but we could not directly upgrade to 10.04 (working upgrade paths are very specific; see a list here: https://help.ubuntu.com/community/UpgradeNotes )

The most surprising part was the python script at the end.

  /usr/bin/python /tmp/unique-folder/lucid --mode=server --frontend=DistUpgradeViewText

The command line itself is not specifically strange. However, the behavior at the end of the script is a bit strange, mainly because I hadn't see it before. Last time the upgrade was

pg_upgradecluster to move clusters between versions

Until now, I only had to upgrade my PostgreSQL databases between computers so I would pg_dump + pg_restore the databases.

However, PostgreSQL offers a tool named pg_upgradecluster that does that work for you, plus it will copy all the different things that pg_dump doesn't always catch such as functions, existing users, etc.

This sounds all good...

So I ran it against our cluster of 298 databases and got a little surprise: it takes about 10 minutes to run on one database, whatever its size. Yes! 10 minutes. Our big database has over 1 million rows, the smallest have a few hundred. Impressive

The certificate is not trusted because it is self signed.

Connection problem with Shredder

Today I got a little surprised by Shredder (the base used to build Thunderbird.)

Somehow, the certificates for my mail server had reached maturation (i.e. it was showing an end date as of today.)

On each connection to the server I would get the following error:

<name>: uses an invalid security certificate
The certificate is not trusted because it is self signed.
(Error code: sec_error_ca_cert_invalid)

Interestingly enough, I search on this error and mainly found things about FireFox and SeaMonkey instead of Thunderbird (and nothing about

Implementation of a secure log in via HTTP[S]

The following is a list of points one wants to follow in order to create a log in form and the necessary code in the backend.

Generate a secure Log In form (session id)

Each time you create a Log In form (or any form if that matters,) you should include a hidden session identifier in it. This will help you prevent users from posting to your server without first loading the form. This alone already prevents a large number of robots from flooding your server with totally useless POST commands1

  • 1. If you know why they do that, let me know because there is really no reason to send totally ...

Error: this.table.tBodies is undefined

Today I got this error which surprised me for a little while. I was pretty sure I had it before, but could not find a reference, so I decided to put it here for sure this time!

Error: this.table.tBodies is undefined
Source File: http://linux.m2osw.com/sites/all/modules/jquery_update/replace/tabledrag...
Line: 516

Whenever I create a table in Drupal and the elements can be sorted, I like to use the drupal_add_tabledrag() feature. This function first parameter is the name of the table to drag. I was totally sure I had it right but it just kept giving me that error, over and over again

Syndicate content Syndicate content

SMS From Me Logo

SMS From Me

To automatically start one on one conversations with your online leads.

     

   

Terms of Site Index

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

  • C
    The C language is one of the oldest. It allows for very fast implementations, but has a huge lack of memory protection.
  • 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.)

  • Safari
  • cron

    Unix daemon used to run background tasks at specified intervals. For instance, once a day, you can rename your log files with .1, .2, .3, etc. and compress them for archival.

  • thunderbird