challenge Nov 2020 with #Prolog

2020-11-14 | #programming #prolog

Below my #prolog solution for “Calculator with Two Buttons” proposed by challenge Nov 2020 swipl ?- shortest_path(0,5034,Path), length(Path,Len), findall(Op,member([_,Op,_], Path), Ops). Path = [[0,+,1],[1,+,2],[2,+,3],[3,+,4],[4,+,5],[5,*,50],[50,*,500],[500,+,501],[501,+,502],[502,+,503],[503,*,5030],[5030,+,5031],[5031,+,5032],[5032,+,5033],[5033,+,5034]], Len = 15, Ops = [+,+,+,+,+,*,*,+,+,+,*,+,+,+,+].

Continue reading 

Active Directory authentication for PostgreSQL users

2020-10-12 | #active directory #ldap #postgres

It is easy, you just need to add to the configuration file /var/lib/postgresql/data/pg_hba.conf host all all ldap ldapserver="myldapserver" ldapbasedn="OU=USERS,DC=group,DC=redaelli,DC=org" ldapbinddn="CN=matteo,OU=USERS,DC=group,DC=redaelli,DC=org" ldapbindpasswd="MySillyPwd" ldapsearchattribute="sAMAccountName" ldapscheme="ldaps" And inside your database yu need to create a role for the Active director users and then grant them to the required databases.

Continue reading 

Using chrome/firefox programmatically for navigating a (Qliksense) website and taking screenshots

2020-09-08 | #automation #chrome #clojure #firefox #phantomjs #qliksense #safari #web scrapying

How do you know if the user interface (UI) of a website you’re developing works as it should and the site as a whole delivers the optimal user experience (UX)? Headless browsers give you a fast, lightweight way to automate high-level actions and get an idea of how well your site operates in common scenarios.

Continue reading 