Software development, photography, jokes, ....


Sites by me

 
tas-logoTransportation Administration System
snoezelkussen-logo-kleinstSnoezelkussens voor verstandelijk gehandicapten
ikzoekeenbegeleider-logoBegeleiders voor gehandicapten
Laat uw hond het jaarlijkse vuurwerk overwinnen
Betuweroute en Kunst
logo 50x50Hey Vos! Je eigen naam@vos.net emailadres?
Kunst in huis? Nicole Karrèr maakt echt bijzonder mooie dingen
nettylogo2Kunst in huis? Netty Franssen maakt ook bijzonder mooie dingen
Professionele opvang bij Gastouderbureau
Kind-Zijn
Salarisadministratie en belastingadvies bij
De Zaak Loont
Zutphense Bomenstichting

Hosting Favorites

 
ANU Internet Services
XelMedia .internet Services
register.com

Blogroll

 
Bomenstichting
LassoSoft
MacFreak
Quality that computes
The Economy of Motion
Wheel 2.0
IntrAktv



Website Hosting bij Xel Media


Marc's Place


 

Understanding Your Spectrum by Dr. Ian Logan #zxspectrum #computer #programming #history #nostalgia #1982

Today I uploaded a digitized version of the well-known book about the Sinclair ZX Spectrum : Understanding Your Spectrum by Dr. Ian Logan .

Understanding-Your-Spectrum-0Understanding-Your-Spectrum-1

Since I could not find a digitized version of good quality, I scanned the book myself.

Have fun reading it. I hope it can be of use to you who still have and program on a ZX Spectrum.
View Comments
 

Backgammon in MacForth 1986 #macforth #forth #programminglanguage #1986 #macintosh #macplus #memories

In 1984, FORTH came to the first Macintosh as MacForth. I coded some apps with it in 1986/7 on a Macintosh and later on my Macintosh Plus.
bitsavers_creativeSo4_10001850
From all the apps I wrote, I kept just one, as a paper source code listing : Backgammon , which I started coding in 1986 but never really finished.
So, for memory's sake, I publish it on my website so you and I can enjoy reading and looking at it, whilst thinking about the first days we had a fabulous MacPlus to work with. BTW, there's still some activity around FORTH on Github .
View Comments
 

Install PHPMailer on MacOS X 10.11 El Capitan or higher

Installing PHPMailer on MacOS X 10.11.6 El Capitan or higher is not as straightforward as I thought because of the new MacOS X System Integrity Protection security where one is not allowed to install stuff in /usr anymore. I wrote down my steps on how I installed PHPMailer on my Macs on this page… .
View Comments
 

Apple Mail and Microsoft Outlook to Evernote @outlook #outlook #apple #email @evernote #evernote #applescript #veritrope #backup #cloudstorage

Bg fix in the Send E-Mail to Evernote script:

- Some splitting needed with multipart/alternative Base64-encoded e-mails.

More info on the download page.
 
View Comments
 

Direct URL 3.3 #directurl #ssb #kioskbrowser #webbrowser #internet #xojo #website #browser

A new version of Direct URL, my Site Specific Browser (SSB), is now available.

3.3
(01-january-2017)

Application Name in MacOS X
In MacOS X the application name, when running, was always 'Direct URL', regardless of the name of the website you gave the copy.
This has now been fixed. For Xojo coders who want to this too, see here for the solution: https://forum.xojo.com/37244-rename-app-on-open/

I have left the 'About' and 'Quit' menu-items untouched, so these still show 'About Direct URL' and 'Quit Direct URL'.
 
View Comments
 

Direct URL 3.2

A new version of Direct URL, my Site Specific Browser (SSB), is now available.

3.2
(20-december-2016)

Linux version discontinued
The Linux version is discontinued. Too much hassle to keep it up-to-date.

New version-detection
- As of v3.2, the app will check for a new new version and pop-up a notification dialog with a link.

Window size
- The last known window-size will now be remembered. At startup, the window will always begin at top 45, left 1 and resize itself according to the saved width and height.

Webkit
- The app now uses webkit, if present.

Loading URL in MS-Windows
- There was a problem with loading an URL under MS-Windows. This has been fixed.

Preferences-file
- Instead of having one preferences file in use by all copies of Direct URL, each copy now gets its own preferences file, named like this: durl-[app name].ini
- If you have used the 'Preferences…', this change breaks it. You have to specify any special URLs and/or passwords again.
 
View Comments
 

ICS Viewer 2.7 #icsviewer #ical #calendar #viewer #xojo #event #planning #planned #timeline

The ical/ics calendar file viewer ICS Viewer is updated to version 2.7.

From / To dates selection fixed.
From / To dates would take the chosen date, but with the current time as as start or endpoint.
For example: 01-01-2016 09:10:34 to 13-12-2016 09:10:34
This would cause events on 01 jan 2016 earlier than 09:10 and events on 13 dec 2016 later then 09:10 not to show up.
From / To dates now use 00:00:00 as From time and 23:59:59 as To-time.

About-window at start
The About-window will not show itself automatically anymore when opening the app.
The about window would pop-up each time you start the application until you donated; only then it would not pop-up anymore.
Since this is a bit annoying, I moved the Paypal-button to the main window. When you donate, this button wil disappear.

New version-detection
As of v2.7, the app will check for a new new version and pop-up a notification dialog with a link.
View Comments
 

Save and Restore Mac OS X Finder Windows, with Tabs and Positions

Since Apple released Mavericks (10.9), the Finder doesn't save and restore its open windows, and the tabs inside these windows. I find this a real nuisance and it wonders me why Apple haven't been able to fix this. I tried writing 'defaults' settings, with no effect.

Anyway, then I decided to write my own solution, in AppleScript. You can download them from this page, second entry.
 
View Comments
 

Add or Subtract Business Days in Javascript, PHP and Lasso

I was lately looking for a working version of a function to add and/or subtract business days. The scripts and code I found via Google somehow did not produce the correct results all the time - and I do not mean the loops that simply add a day and check for weekends. Read more . . .
 
View Comments
 

Make a new folder inside a selected folder with Applescript

I wrote an Applescript with which one can create a new folder inside a current selected folder, or inside a current window or inside a folder containing a selected item.
You can read more and copy the code from my Scripting-page.
 
View Comments
 

Apple Mail and Microsoft Outlook to Evernote

Today I modified a copy of my version of the Send E-Mail to Evernote script to work with Microsoft Outlook on Mac OS X.
Since I now have two scripts, I renamed them accordingly :
  • Send E-Mail (Apple Mail) to Evernote
  • Send E-Mail (MS Outlook) to Evernote

More info on the download page.
 
View Comments
 

ICS Viewer updated to 2.6

The ical/ics calendar file viewer ICS Viewer is updated to version 2.6.

CATEGORIES added as a new column.


 
View Comments
 

E$DBL subroutine library download

Om de zaak compleet te maken is de source code van mijn E$LIB subroutine bibliotheek en mijn E$XIB XIBOL compatible subroutine bibliotheek voor Synergy/DBL te downloaden vanaf deze pagina.
 
View Comments
 

E$DBL subroutine library handleidingen

Eindelijk na jaren is ook mijn E$LIB subroutine bibliotheek voor Synergy/DBL (kort na de overname van DIBOL ook wel Synergex/Language genoemd) online. De routines stammen uit 2000 en zijn terminal-gebaseerd en niet geschikt voor het maken van web-applicaties.

Met mijn ex-bedrijf EARTH Software Development (nu SDS82) heb ik deze routines veelvuldig ingezet bij Briscon Software en Wielens Aandrijftechniek.
 
View Comments
 

Cursus Sinclair ZX Spectrum programmeren

Ik heb lang geleden, 1985, een handleiding 'Cursus ZX Spectrum programmeren' geschreven. Ik begon toen net met IT en volgde de I-cursussen bij Rovycom Computer Opleidingen te Rotterdam. Ik was toen 25 jaar. Hij vroeg mij of ik een cursus wilde geven voor de ZX Spectrum en dat vond ik een compliment en een uitdaging!

Ik heb de cursus geheel op de ZX Spectrum geschreven en geprint. Later heb ik de machine verkocht (nog altijd spijt van, maar ja), maar gelukkig de papieren handleiding zorgvuldig bewaard. Vorig jaar heb ze ingescand zodat er met de papieren versie gebeuren kan wat wil, de handleiding blijft bewaard. Vorige week heb ik ze met OCR omgezet naar tekst en er een webpagina van gemaakt, met link naar een download van het gescande origineel.

Veel plezier met het ophalen van jeugd-herinneringen!
 
View Comments
 

ICS Viewer updated to 2.4

The ical/ics calendar file viewer ICS Viewer is updated to version 2.4.

A multi-line SUMMARY, which I did know could exist, is now handled correctly.

Thanks to Phil Birch for pointing this out.

 
View Comments
 

ICS Viewer updated to 2.3

The ical/ics calendar file viewer ICS Viewer is updated to version 2.3.

DTEND with All-Day Events is now handled correctly: DTEND minus 1 day is actually the last day of the All-Day Event.

Thanks to Kevin Edwards for pointing this out.

 
View Comments
 

E-Mail to Evernote

I fixed some other flaws in my version of the Send E-Mail to Evernote.scpt:

Update 22 dec 2014:
- I repaired a situation where a piece of a HTML-email 'header' is no header, but contains a <style> … </style> segment, which contains semi-colons and which does not contain ampersands. And that is where the script crashed. This is the case with 'Order confirmation'-emails coming from DAZ 3D. I added the test if the part does also not contain a } and then it went through. Fixed. Now wait for the next email-formatting-idiocrazy for which the script has no solution.

See also my previous posts regarding this script.
 
View Comments
 

ICS Viewer updated to 2.2

The ical calendar file viewer ICS Viewer is updated to version 2.2.

A crash when no DTEND entry was present has been repaired. This seems to be possible with Google Calendar events.
 
View Comments
 

Leer jezelf programmeren

Ik zag dat mijn ooit geschreven boeken en artikelen nog niet op de site stonden. Lang geleden heb ik een poging ondernomen het boek 'Leer jezelf programmeren' uit te geven, is niet gelukt: het was te algemeen. Nu dus gratis te downloaden!

Klik hier voor de eerste twee publicaties…

Ik zal eens kijken wat ik nog meer aan interessante artikelen heb liggen die te 'veralgemeniseren' zijn, zodat u ze kunt gebruiken in uw projecten.
 
View Comments
 

Mijn FileMaker Pro toepassingen geactualiseerd

Ik heb mijn FileMaker Pro 5 toepassingen op verzoek geconverteerd naar recentere versies. U kunt de toepassingen nu downloaden voor alle versies vanaf versie 5. Voor elke compatibele versie heb ik een download-knop gemaakt, zoals in onderstaand voorbeeld wordt getoond:

Screen Shot 2014-10-13 at 14.00.03
 
View Comments
 

E-Mail to Evernote

I fixed some other flaws in my version of the Send E-Mail to Evernote.scpt:

Update 13 aug 2014:
- I repaired a situation where there is no content-type found in the email headers. I now set it to text/plain in such a case.

Update 5 aug 2014:
- I repaired the strange time formatting (1=3=4=5 instead of 1345) when adding multiple email messages at once.
- And I added a dialog when the script has successfully finished processing for when Growl is not active.

See also my previous posts.
 
View Comments
 

E-Mail to Evernote

I fixed a bug in the Send E-Mail to Evernote.scpt where it would crash if the HTML at some point would contain &nbsp; or other ISO encoded characters. You can download a new version here.

If you maintain your own changes in this script, here's the fix. Change the following lines inside the function htmlFix:

     --TEST FOR / STRIP OUT LEADING SEMI-COLON
     
if item 1 of paraSource contains ";" then

into this:

     --TEST FOR / STRIP OUT LEADING SEMI-COLON (skip &nbsp; stuff)
     
if item 1 of paraSource contains ";" and item 1 of paraSource does not contain "&" then
 
 
View Comments
 

E-Mail to Evernote

A while ago i was looking for a way to shrink my list of mailboxes and the 1000s of mails therein. I already use MailSteward Pro to backup my emails to a remote MySQL server, but that is just in case everything gets lost at Apple's iCloud. Which isn't very likely.

Since my Apple Mail is starting to crash every few days since the latest Mavericks updates and is getting really slow in opening old and getting new mail (although I run on SSD), I am looking for another way to archive old emails and still have the same easy access with all search capabilities. This where Evernote comes in! Googling a bit I found this AppleScript: Apple Mail to Evernote.

The script works perfectly under Mavericks and I added some code to get the date/time in the title of the note. A screenshot of how an email in Evernote looks when my modified version of the script has done its job:

Screen Shot 2014-05-15 at 10.49.19

What you'll miss though is the grouping of the 'Conversation'-view which you have in Apple Mail.

So you can download the original or download my version.

Thanks to Veritrope for this very useful script!
 
View Comments
 

Store/Show BLOB images with PHP and Lasso 9

I have added a new page to the 'How To'-list where you can find information about how to read an image from disk, store it into a MySQL blob-field and display that image on a web page. Reading and storing is done with PHP, displaying with Lasso 9. [Read more...]
View Comments
 

Hex2Str and Str2Hex Javascript Functions

Today I needed some Javascript to convert a HEX-encoded string to an ASCII-encoded string. The reason is that to be able to send all possible strings via AJAX-calls back to the client, without problems with quotes, apostrophes and other non-ASCII7 characters, I decided to encode the AJAX-data to hex, which is a nice and simple ASCII7 string of only the characters 0 through 9 and A through F.

After Googling a bit I found an example on webdeveloper.com and some tips on stackoverflow.com, and both combined with some of my own JS-knowledge, I came up with the following small and handy functions:

function Str2Hex(tmp) {
var str = "";
for (var i=0; i<tmp.length; i++)
str += ("00" + (tmp.charCodeAt(i)).toString(16)).substr(-2);
return(str);
}
function Hex2Str(tmp) {
var str = "";
for (var i=0; i<tmp.length; i+=2)
str += String.fromCharCode(parseInt(tmp.substr(i,2),16));
return(str);
}

For example, after a user made a selection from the autocomplete menu and you return a HEX-encoded string containing multiple values, separated by "+++", to fill other form-fields too:

..., select: function(e,u) {
var x = Hex2Str(u.item.value).split("+++");
$("#field1").val(x[0]).change();
$("#field2").val(x[1]).change();
... etc.
return false; } ....

Or when you return multiple values as a HEX-encoded JSON array:

..., select: function(e,u) {
var x = u.item.value;
$("#field1").val(Hex2Str(x.field1)).change();
$("#field2").val(Hex2Str(x.field2)).change();
... etc.
return false; } ....

Happy coding!

View Comments
 

Sublime Text 2 Color Scheme for Lasso

Sublime Text 2 is a superb code editor. I am using it now since 4 days and I am already completely used to it. I thought I would miss all integrated functions in Coda 2, but it turns out that I don't. I already use applications like Transmit, SmartSVN and Navicat outside Coda 2 to do more than can be done from within Coda 2, so I am already used to that. After 4 days of coding with Sublime Text it is now the other way around - I miss stuff in Coda 2 that makes me turn back to Sublime Text!

A fellow developer has made a great Lasso syntax highlighter for Sublime Text 2 and I have been playing around a color scheme to get the (almost) same syntax coloring as I had in Coda 2. Maybe you find it useful too.

20130424113839-Lasso


Download myLasso.tmTheme and put it into:
/Users/<YOU>/Library/Application Support/Sublime Text 2/Packages/Color Scheme - Default/

(to install on Win / Lin - read this part of the manual)

And this is my 'all-the-extra-packages-you-need' list:
View Comments
 

Country codes, Postcodes, City names, etc. at GeoNames

In search for a good list with ISO-country names and relevant data, I ended at GeoNames. This site offers really super data, like even the RegExp to test a postcode value! Really great! And even more data of countries worldwide, like largest cities, highest mountains, capitals, postal codes, country statistics and much more.

And all for free. However, I can imagine what a job this must be to keep all that data up-to-date, so I donated for the data I downloaded (donate button is at the top of the donate & sponsoring page).

See also my earlier post about calculating postcode-to-postcode distances.
 

View Comments
 

Yourhead Collage 2 not working in IE9

I found the bug that blocked YourHead's Collage 2 from working in Internet Explorer 9. You can read about it at, and download the corrected plug-in from, the YourHead Support Forum. I attached it there to my last response. If you can't download it from there, contact me and I'll mail you the 2MB zipped file.

Do not 'install' the unzipped file. Rather copy it to /Users/YOURNAME/Library/Application Support/RapidWeaver/

You can open your 'Library' folder, if you do not see it, like described here: http://www.macworld.com/article/1161156/view_library_folder_in_lion.html

 
View Comments
 

Remove dynamic tables from Lasso 8 and MySQL

I wrote a small script that cleans up Lasso 8's internal SQLite database from dynamically created tables in MySQL. It also deletes the dynamic tables from MySQL when older then 2 days, so you do not need a separate script for that.

In my case, the script has been written to clean my dynamically created temp tables, which names all begin with 'REP'. But you can copy the script and of course modify it to your needs.

Happy coding!
View Comments
 

Restrict Lasso AJAX-file calls to the intended web page

Suppose you have a nice setup where a page interacts with the server via AJAX-calls and executes a Lasso file on the server to get some data. You don't want this file to be called directly via the URL-bar in a web browser, or via other self-made web pages by others who try to access it via a copy of your page. Anybody can see which AJAX-files your page is calling, so for some it is always a challenge to execute them outside the normal webpage to see what data will come up. Might be of interest! So you want to prevent that, somehow.

There is a Lasso-tag called referrer_url, which returns a string containing the URL that requested your AJAX-page. If you look into this string for a domain name or a path that only you have, you can block execution if the requestor is not coming from your server. When a page is called directly in the browser, the referrer_url is always an empty string. Which is logical, since the page was not referred to by another page.

Suppose I have a page mypage.html with a jQuery auto-complete implementation in it. This auto-complete can of course be used by more than one page and you do not want people to try it out in other ways.

...
...
<input type="text" id="inp1" size="25"><span id="desc1"></span>
...
...
<script>
$(document).ready(function() {
   $("#inp1").autocomplete({minLength:2, source: "ajax.lasso?p1=a&p2=b", select: function(e,u) { $("#inp1").val(u.item.value); $("#desc1").html((u.item.label).replace("(" + u.item.value + ")", "")); return false; } });
});
</script>


Simple protection:
[
if (referrer_url >> '/mypage.html' || referrer_url >> '/myotherpage.html');
...
...
/if;
]


Better protection:
[
if (string(referrer_url)->beginswith('http://my.domain.com/') &&
   (referrer_url >> '/mypage.html' || referrer_url >> '/myotherpage.html'));
...
...
/if;
]


So this gives you some protection from just try something-users. Add a login-system, which restricts the number of users that might want to hack your pages - you can trace their actions on your site. In that case, add a check if the user is logged in. You must execute your complete login-sequence in your AJAX-pages too, as with 'normal' pages, since the xhttprequest is a normal HTTP request and thus the browser sends the same HTTP-headers and cookies, etc.. to your AJAX-page.

More protection:
[
if (referrer_url >> '/mypage.html' || referrer_url >> '/myotherpage.html');
   var('loggedIn = false');

   include('checkuser.lasso');

   if($loggedIn);
      ...
      ...
   /if;
/if;
]


Even better protection:
[
if (string(referrer_url)->beginswith('http://my.domain.com/') &&
   (referrer_url >> '/mypage.html' || referrer_url >> '/myotherpage.html'));
   var('loggedIn = false');

   include('checkuser.lasso');

   if($loggedIn);
      ...
      ...
   /if;
/if;
]


But, as with everything web-related, nothing can be trusted.
 
View Comments
 

MySQL: Split a comma-separated list and insert result into table

Looking for a SPLIT-function in MySQL, I came across this one. I tried it and I must have have done something not right, because MySQL threw an error at the function. I am not a MySQL guru and since this is a one time Q&D conversion-action, I only took the SUBSTRING code and created a query with which one can split the contents of an old field into separate columns and directly insert the results into a new, normalized table.

My example is about a TEXT-column I want to get rid of and of which I want to transfer the contents to a separate table. This column contains email addresses separated by a comma. Thus, first, I had to find the maximum number of email addresses used in that column, so I found this query and added MAX() around it.

select max(length(emails) - length(replace(emails, ',', ''))) as occurrences
from old_table
where emails<>''


With that number, I created that number+1 of unions, so I would end up with all email addresses in one column. That select statement is then used in a left join to retrieve the corresponding user name and feed the results at the same time into a new table, which uses an ID and a USER-ID, instead of an email address:

insert into new_table
select idnr, user
from (
  select idnr,
  trim(substring(substring_index(emails, ',', 1), char_length(substring_index(emails, ',', 1 -1)) + 1)) as email
  from old_table
  where emails<>''

  union

  select idnr,
  trim(substring(substring_index(emails, ',', 2), char_length(substring_index(emails, ',', 2 -1)) + 2)) as email
  from old_table
  where emails<>''

  union

  select idnr,
  trim(substring(substring_index(emails, ',', 3), char_length(substring_index(emails, ',', 3 -1)) + 2)) as email
  from old_table
  where emails<>''

  union

  select idnr,
  trim(substring(substring_index(emails, ',', 4), char_length(substring_index(emails, ',', 4 -1)) + 2)) as email
  from old_table
  where emails<>''
) as x
join users u on (u.email1=x.email or u.email2=x.email)
where x.email<>''


Now that I have all used email address associated with the IDs of the original rows, I can now delete the old column and change all my LIKE-queries into LEFT JOINs. Much better, because email addresses change.
 
View Comments
 

E$-Library Manuals for AS/400 now online

Manuals for my E$-Modules and Functions for AS/400, iSeries or eServers are now online and searchable. I discovered a lot of typos and faulty descriptions in the old manuals, so the manuals included in the downloads have been removed. This way it is also easier to update them - and you can save them locally without my sidebar etc. by copying the contents and paste them into Pages or Word. Also, I added *SAVF files to the three major utilities still in use by me, which makes it installation on your iSeries a breeze.
View Comments
 

mv_timeMenu

I just edited the tag mv_timeMenu on tagSwap. Because copy/paste on tagSwap does something with line endings that makes much code end up all being on one line, I post the routine here too. Simply copy & paste.

/*
  Creates a list of time values inside a <select></select>. Example:
  <select name="xyz" class="abc" id="def">
  [mv_timeMenu(-fromHour=800, -toHour=2300, -minutes=25, -selected=$db_value]
  </select>
*/
define_tag('mv_timeMenu', -optional='fromhour', -copy, -optional='tohour', -copy, -optional='minutes', -copy, -optional='selected', -copy, -optional='firstblank', -EncodeNone);
  local('result' = '', 'p' = 0, 'z' = 0, 'h' = 0, 'm' = 0, 'y' = 0, 'f' = false);

  if(! local_defined('firstblank'));
    local('firstblank' = 0);
  else(integer(#firstblank) <= 0);
    #firstblank = 0;
  /if;
  #firstblank = integer(#firstblank);

  if(! local_defined('fromhour'));
    local('fromhour' = 0);
  else(integer(#fromhour) <= 0);
    #fromhour = 0;
  /if;
  #fromhour = integer(#fromhour);

  if(! local_defined('tohour'));
    local('tohour' = 2359);
  else(integer(#tohour) <= 0 || integer(#tohour) >= 2400);
    #tohour = 2359;
  /if;
  #tohour = integer(#tohour);

  if(! local_defined('minutes'));
    local('minutes' = 15);
  else(integer(#minutes) <= 0);
    #minutes = 15;
  /if;
  #minutes = integer(#minutes);
  
  if(#firstblank);
    #result = '<option value="" ';
    if(local_defined('selected'));
      if(#selected == '');
        #result += ' selected="selected"';
      /if;
    /if;
    #result += '></option>';
  /if;
  
  // Calculate correct starting point
  #z = #fromhour;
  #h = integer(#z / 100);      // Take hours-part
  #m = #z - (#h * 100);      // Take minutes-part
  #y = integer(#m / #minutes);  // Calculate how many times the frequency fits

  // Calculate new minutes-starting-point
  if(#m == (#y * #minutes));
    #m = #y * #minutes;
  else;
    #m = (#y + 1) * #minutes;
  /if;
  
  #y = integer(#m / 60);      // Calculate how many hours minutes-starting-point contains
  #h += #y;            // Add those hours to the hours-part
  #m -= (#y * 60);        // Subtract the hours from minutes-starting-point
  #z = (#h * 100) + #m;      // Construct new time

  #p = 0;
  #f = false;
  while(#z <= #tohour);
    #result += '<option value="' + mv_fmtnum(#z, '####', 'R') + '" ';
    if(local_defined('selected'));
      if(!#f && #selected != '' && #selected >= #p && #selected <= #z);
        #result += ' selected="selected"';
        #f = true;
      /if;
    /if;
    #result += '>' + mv_fmtnum(#z, '##:##', 'R') + '</option>';

    #p = #z;        // Save previous time
    
    #h = integer(#z / 100);  // Take hours-part
    #m = #z - (#h * 100);  // Take minutes-part
    #m += #minutes;      // Add interval to the minutes to get total-minutes
    #y = integer(#m / 60);  // Calculate how many hours total-minutes contains
    #h += #y;        // Add those hours to the hours-part
    #m -= (#y * 60);    // Subtract the hours from total-minutes
    #z = (#h * 100) + #m;  // Construct new time
  /while;

  return(#result);
/define_tag;
View Comments
 

Use SmartSynchronize with Coda (= replace opendiff)

Here's a small how-to replace opendiff (FileMerge) with SmartSynchronize. This way you integrate SmartSynchronize with Coda and possible other SVN-GUIs or IDEs.
View Comments
 

Encode/Decode BASE64 scripts for Coda

Here you will find two scripts for use with Panic's Coda, which take selected text and encode it to BASE64 or decode it from BASE64, inside the current editor (base64coda).
To add the scripts to Coda's scripts-menu, click the menu and select 'Open Enclosing Folder':
coda20110929a
Drag the scripts in the opened folder, go back to Coda and select 'Reload Scripts' from the scripts-menu. You should see the two new scripts:
coda20110929b

Now, select some text and choose BASE64 Encode and then BASE64 Decode to see your text again.
View Comments
 

CSS buttons

Today I converted all download links on this site, from using Javascript + CSS to style them to CSS-only (with a background image). I kept some CSS from the JSbuttons installation, because that is how I still want them to look. In case you're interested, here's the CSS:

General CSS:

.mybutton {
   display: block;
   position: relative;
   float: left;
   background: #aaa;
   padding: 5px;
   margin-top: 0px;
   margin-bottom: 10px;
   border: 1px solid gray;
   border-radius: 5px;
   text-decoration: none;
   text-align: center;
   color: #fff;
   font-style: normal;
   font-weight:bold;
   line-height: 15px;
   cursor: pointer;
}

.mybutton:active { background: #444; }
.mybutton:hover { background: #eaeaea; }

.mybutton.blue { background: #2ae; }
.mybutton.blue:hover { background: #05b; }

.mybutton.green { background: #5b5; }
.mybutton.green:hover { background: #282; }

.mybutton.pink { background: #e1a; }
.mybutton.pink:hover { background: #a0a; }

.mybutton.yellow { background: #dd3; }
.mybutton.yellow:hover { background: #aa0; }

.mybutton.black { background: #222; }
.mybutton.black:hover { background: #000; }

.mybutton[class] {
   background-image: url(%pathto(button-shade.png)%);
   background-position: bottom;
}


On a per page basis:

a.mybutton {
   height: 16px;
   width: 100px;
   color: #eeee00;
}

a:hover.mybutton { color:#ff5500; }


And this is the background image (inside the border):


Normal link:.mybutton link:
Go to AppleGo to Apple
<a href="http://www.apple.com/">Go to Apple</a><a href="http://www.apple.com/" class="mybutton blue">Go to Apple</a>

 
 
View Comments
 

ICSviewer

iconA small program to convert a calendar-export (.ics-file) to table-format and calculate working hours, so you can copy and paste the results of your calendar entries into an invoice or a spreadsheet.
Download here.
View Comments
 

Growl for REALstudio / REALbasic / Xojo

If you want an easy way to implement Growl notifications into a REALstudio project, download this zip-file: growl-for-realbasic It contains the following objects:

Growl.rbo
growlNotifyScript.scpt
growlRegisterScript.scpt
growlRunningScript.scpt


I added the check if the GrowlHelper application is running before issuing Growl-commands.
To use the class, copy the four files into your project's folder and all four objects into your REALstudio project and then double-click the Growl-class to open it. Inside is a Notes-section which explains how to use it.
(Original source code can be found here at BitBucket)
View Comments
 

Finding postcodes near a known postcode

I am building a website where I need to find people based on their postcode and have been searching the past month for a good and cheap solution. From solutions costing around €2000 down to solutions costing €500 down to one which costs only €99 for a latitude/longitude database of Dutch postcodes, to be found at GEODATAS.net. On their website is sample code present and I converted the PHP-version to Lasso 8 code. —> Click here for how-to and demo code.
View Comments
 

Certified Lasso Developer 'Bragware'

As stated in their email in which I received this medal: pure bragware! In that case ... Let's brag! Pasted Graphic 1

First-100-new
View Comments
 

Coding Lasso with RapidWeaver as a framework

I have created a page of how I recently found a cool way to use #RapidWeaver, #Lasso and #Coda at the same time and use RapidWeaver only for the framework, which it does very good.

View Comments
 

Get Day or Date of the Monday of a given week

I have created a Javascript function to get the date of the monday in a given week. The following functions are included:
  • mv_leapck(year, flag) - returns 0 or 1 or 365 or 366,
  • mv_isDateObject(something) - returns 0 or 1
  • mv_dateToString(something, formatstring) - returns a string containing parts of a date according to a passed format
  • mv_mondayOfWeek(year, weekno, flag) - returns the monday of the week as (a) a day number (YYYYDDD) or (b) milliseconds or (c) a date as YYYYMMDD
The page contains a live example to test with. Get it here.
 
View Comments
 

Using Kaleidoscope with Coda

Here is a short description of how to replace opendiff so Coda coda uses Kaleidoscope kaleidoscope instead of Apple's FileMerge.
 
View Comments
 

Starter-app for Yaoqiang BPMN Editor

I have made a starter-app which starts the Yaoqiang BPMN Editor .jar-file. It's only meant for use with the Mac OS X dock, because you can't position a .jar-file in the application section of the dock.
You can find it on my REALbasic page.

Screen shot 2010-12-08 at 18.02.15
View Comments
 

Use Flot graphing library with Lasso Professional

I have created a quick example on how to create a graph with Flot and Lasso Professional. Flot is a really cool graphing library and Lasso is a cool programming language. Together, they create a great graph!
View Comments
 

At the Lasso Developer Conference 2010



The Euro Lasso Developer Conference 2010 was held in Berlin on 30 and 31 of october 2010 @ GLS Campus Berlin. Organized by ANU Internet Services, this was a great idea and happening. The brand new Lasso 9 was discussed very much; various demos and presentations of code and sites built with Lasso 9. LassoSoft announced they found an investor and were getting back on track! Only good news - of course!
It was nice to meet fellow developers who I normally only have contact with by reading and posting to mailing lists.
Thanks to Chris Wik from ANU for his spontaneous idea and rapid put-together of a well done DevCon!

Presentation Videos:
The Eurolasso Channel @ Bambuser

More links:
Database Versioning by Johan Sölve
L-Debug and L-Benchmarking by Ke Carlton
Twitter
Flickr

View Comments
 

Install Lasso 9 from svn on Mac OS X client

I have put together instructions on how to install Lasso 9 from the svn repository on a Mac. The content is derived from pages at LassoTech, extended with stuff I came across during installation or via email exchange with fellow coders.
View Comments
 

Inhoudsopgaven Webdesigner

De inhoudsopgaven van Webdesigner, vanaf nr 26, heb ik in Evernote samengebracht en zijn voor iedereen toegankelijk èn doorzoekbaar op tekst: http://www.evernote.com/pub/macvos/inhoudwebdesigner
Met dank aan Evernote die de PDF's and JPG's OCRt.
(zie ook de post m.b.t. iCreate voor een korte uitleg over hoe je kan zoeken in Evernote's publieke pagina's)
View Comments
 

ThrashBoxes stack editable background

For the ThrashBoxes stack from SymfoniP, for use with Stacks from Yourhead, I created a layered Photoshop file which can be used to create a different background. Read on...
View Comments
 

Using FTP in Lasso

I created a page about the various ways to use the FTP protocol with Lasso, from and to various systems. Find it here. I have been trying to get it work the last few days and now that it does, I wanted to share what you can do. Of course there are probably installations where it all works out-of-the-box, but this time not with me.
View Comments
 

Web browsers and speed

Where I work we use a home-made Transport Track & Trace System. I can't publish the page here because it contains company material, but I can say that the output for the people who need a complete overview of all ongoing transports, is a page with lots of tables:

Screenshot2010-02-09at14.02.05-2010-02-9-13-52

and a lot of rows:

Screenshot2010-02-09at14.02.20-2010-02-9-13-52

I used Coda to find out how many '
The transportation data (truck, shipper, consignee, forwarder, etc.) on this page is pulled from a database and the page is generated on the server, all done by a Lasso script and then send to the browser. We had some complaints about loading times, so I did a perceptual stopwatch test with different browsers and Mac OS X and Windows XP. The stopwatch started as I clicked OK on the HTTP-authentication dialog and stopped when the spinning wheel stops. Here they are:

iMac 24" from 2008 with OS X 10.6 on 3.06GHz Intel Core 2 Duo

Safari 4.0.4 :

+/- 55 seconds

Firefox 3.6 :

+/- 90 seconds

Chrome 4.0.249 :

After 4 minutes an execution dialog and it never ends loading.


Macbook Pro from 2009 with Windows XP Bootcamp on 2.8GHz Intel Core 2 Duo T9600


Internet Explorer 8.0.6001 :

After 4 minutes an execution dialog and it never ends loading.

Safari 4.0.4 :

+/- 48 seconds

Firefox 3.6 :

+/- 61 seconds

Chrome 4.0.249 :

After 4 minutes an execution dialog and it never ends loading.


So it is true : Safari is the fastest browser.

View Comments
 

Google Maps and Geocoding

Here's my implementation of Google's geocoding API, which I am going to implement in SetEXIFData :

View Comments
 

At the Lasso Developer Conference 2009

LDC09-2009-10-5-22-17

From october 1 thru 4, the Lasso Developer Conference 2009 was held in Amsterdam. For me, this was the first time because a) it was in Amsterdam and b) Lasso 9 would be introduced and c) at last I would meet quite a few fellow Lasso-ers in real life.
There were some round-tables and workshops presented by Lasso-ers themselves, where some interesting topics were discussed and great solutions to returning questions were offered.
LassoSoft picked a real cool location: Spaces at the Herengracht. You can see some photo's of it here.

It was great. Thanks Lassosoft and everyone for this opportunity!

DSCF0114-2009-10-5-22-17.JPG

LDC09 Video's :
YouTube - LassoSoft's channel

Here are some links to LDC09 material :
LassoTech
At_begin URL-handling and REST
Version Control Systems
L-Migrator presentation
itPage presentation
Lfor presentation
Encoding and Character-sets
File permissions
jquery Week calendar

Check out the lively Lasso community at LassoTalk
And Brian's blog-post
View Comments
 

A new design

Today I found it necessary to redesign my website.. I've been doing it for others all the time, and now it is my turn. And this is it! Of course I didn't design this cool look and feel - that's part RapidWeaver (www.realmacsoftware.com) and Elixer Graphics (www.elixirgraphics.com). Lot's of the nice effects and page-layouts are done with YourHead's (www.yourhead.com) and Loghound's (www.loghound.com) excellent plug-ins.
View Comments
 
See Older Posts...
© 1997- Marc Vos (and others) Contact Me