The Linux Page

OS

stream_socket_client() fails with no errors...

Today I had a weird one.

The PHP function named stream_socket_client(), used to create a socket to communicate with another computer over a network, may return $errno = 0 and $errstr = "".

The PHP reference actually mentions the problem:

On failure the errno and errstr arguments will be populated with the actual system level error that occurred in the system-level connect() call. If the value returned in errno is 0 and the function returned FALSE, it is an indication that the error occurred before the connect() call. This is most likely due to a problem initializing the socket. ...

Desktop Google Calendar now defaults to Agenda because I have it on my Android...

Since I got my Android phone earlier this year, I got a huge problem with Google Calendar.

I use the calendar mainly on my Desktop. Big screen, easy to read and use. But on the Android, the format is Agenda to make it possible to use at all.

Somehow that has a really bad side effect: the display is now always forced to Agenda on my Desktop too. Really annoying!

Tere is actually a very easy fix! It took me months the discover it and it's actually very easy.

I have the Calendar link bookmarked so I can just click one button to get it open.

All I had to do is add the following anchor at ...

Add or subtract to a Time field in LibreOffice

Today I was working on a spreadsheet where I added a time for a calendar type of sheet.

What I wanted to do is have a column where time increases without having to type each time manually.

So I needed to add 15 or 30 minutes to the first time.

Say my first time is 7am, it appears as 07:00:00 AM.

In the next row (B4), I wanted to do something like:

=B3+"15 minutes"

The fact is that LibreOffice saves time and date as a double number where 1.0 represents 1 day.

So to add just 15 minutes, you need to divide your number by the number of minutes in a day:

=B3+15/60/24

Or if ...

Supermicro X9SCI/X9SCA, video is gone!

As I am still trying to get my computers to work with a dual seat (or multiseat), I did an attempt in using the onboard video (a relatively decent Matrox card.) So I went in the BIOS and changed the setup for the video from Offboard to Onboard. Big mistake!

The video stopped working. On reboot the computer beeped 8 times and booted the OS normally (I have SSH setup so I could access the computer, but absolutely no video on either port: on board and off board.)

I have a Supermicro X9SCI/X9SCA. Searching for "no video" or "missing video on boot"... returned nothing ...

The for() in C, C++, Java, PHP, JavaScript...

As I am working on my as2js compiler, I stumble on a couple of problems with the for() loop parsing because of the in keyword. That made me think and the for() statement was actually a very funny one. Yes! You can actually write something like this and it compiles:

int zero;
for(3;2;1) zero;

As you can see, all 3 entries in the for() statement are valid expressions and therefore the compiler can compile that code. This creates a loop that runs forever, similar to:

for(;;) zero;

but much less clear to read, obviously.

Now that's food for thought, isn't it?

In JavaScript, you ...

md5sum for MS-Windows

Today I needed to test a transfer from a file system to another making sure that a 750Mb file was being tranfered correctly. For this I wanted to run an md5sum on the file from the native OS (MS-Windows) and then on the target OS (Linux).

I found a nice utility that worked right in and returned the correct result (what I'd expect.)

MD5sum by Jem Berkes, SysDesign

Welcome to The Mac OS/X Page


Fox Trot by Bill Amend. Click to enlarge.

Click to enlarge

[toc hidden:1]

Taking a Screenshot on Mac OS/X

In order to take a screenshot on your Mac OS/X system, simply type "Apple-Shift-3". Then you will see an image on your Desktop. As far as I know you cannot control where the image will go.

There are many other combinaisons that let you select the part of the screen you want a screenshot of.

The name of the file on your dekstop is "Picture #.png" where # increases as required. Although since 10.4 you can change the file format with a Unix command.

The Conduit Toolbar

Today I tried a new system. It lets you create a toolbar for your browser. One thing that impressed me was that it worked for Internet Explorer and FireFox and runs under MS-Windows and Mac OS/X, but also works beautifully under Linux!!!

Note that SeaMonkey will ask you whether you want to install that software and it will fail since it has some features like FireFox but the installation process is different.

Now, I like the bar for one reason: I can put RSS feeds in there and see it tick. Only problem there, it goes too fast.

.dylib extension missing

The other day, I created the odbcpp library. When I tried to build it on my Mac OS/X 10.4 (Tiger) I got a problem with the dynamic libraries. Instead of a .dylib extension, I got... nothing at all! (this problem was also reported on 10.5) I was sure that it worked for me with other libraries I developed (such as my sswf library) and thus I decided that I was not going to be left alone. Well...

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.

  • Intrepid

    Name of a Walt Disney character used for a version of Ubuntu.

  • cluster
  • decimal

    Most Database systems offer a number type called DECIMAL. In general, it represents a fixed integer number with a set number of digits on the left side of the decimal point and a set of digits after the decimal point. Some database system will use floating points instead. Commonly used synonyms are MONEY and CURRENCY.

  • language

    In computing, a language is a lexicon and grammar enabling a programmer to write software. There are interpreted and compiled languages. When compiling the computer transform the instructions of a program into instructions that the processor can execute natively.

  • search