zaterdag 19 augustus 2017

Oracle XE expired password

sqlplus /nolog
SQL> connect / as SYSDBA
Connected
SQL>


select username, account_status from dba_users where ACCOUNT_STATUS LIKE '%EXPIRED%';

ALTER USER theusername IDENTIFIED BY thepassword;

ALTER USER theusername ACCOUNT UNLOCK;

maandag 14 augustus 2017

Javascript: From callback to Promise

const fetch = (url, options = {method:'get'}) => new Promise((resolve, reject) => {
    let request = new XMLHttpRequest();
    request.onload = resolve
    request.onerror = reject;
    request.open(options.method, url, true);
    request.send();
});

zondag 25 juni 2017

Draait applicatie in 32- of 64 bits?

Als je in een C# programma wilt weten of het wordt uitgevoerd in 32 of 64 bit, draai de volgende code:
            if (IntPtr.Size == 4)
            {
                MessageBox.Show("32 bit");
            }
            if (IntPtr.Size == 8)
            {
                MessageBox.Show("64 bit");
            }

vrijdag 2 juni 2017

Zonder JQuery en JQuery UI

Het gebruik van je javascript libraries moet je soms even tegen het licht houden.
Zo is Jquery UI een lib die vrij zwaar is, en ik niet gebruik behalve voor de datepicker.
JQuery zelf is vaak ook overbodig.

http://youmightnotneedjquery.com/
https://github.com/dbushell/Pikaday

vrijdag 28 april 2017

SQLite An attempt was made to load a program with an incorrect format.

Using SQLite in dotnet may result in an error: "An attempt was made to load a program with an incorrect format."

In my case the problem was the development webserver of Visual Studio 2017, which runs in 32-bit mode by default.
See the setting: http://tegtips.blogspot.nl/2014/07/visual-studio-2013-iis-express-64-bit.html