10.16.2017

Bark-bark!! The LotusScript CWebContentConsumer now support REST Service POSTs with files++

Tags: : LotusScript Java
0

A couple of days ago I wrote the blog-post Teach the old dog some new tricks: Let LotusScript consume REST Services the easy way. I thank you all for the good feedback! Nice to see that some old school, classic Notes development, still got some traction Smile

Well, I was in the spirit to add some features today too!

First and foremost you now have the ability to add a payload to the PostJson, PostXML and PostHTML. By payload I mean a text string of any kind, but typically a JSON or XML. In a way you can think of it as a way of uploading a file or text together with other request headers or URL parameters.

This means that code like this;

image

… results in this;

image

Note that the payload isn't tagged a a proper multipart MIME or anything, but perhaps you can add that yourself with a combination of the new support methods for base64 encoding and decoding? You now have these additional methods;

  • EncodeStringAsBase64. Encode a string as base64. Build your own multipart XML or MIME structure, and combine that with one or more AddRequestHeaders? Or stuff the base64-encoded string as a payload directly with SetPayload.
  • EncodeFileAsBase64. Encode a whole file as base64. Remember that this hasn't been tested on huge files or anything Smile
  • DecodeBase64String. Decode a base64-encoded string back to it's textual form.
  • DecodeBase64StringToFile. Finally decode a base64-encoded string directly into a file on your disk.

I also added DownloadFileFromURL which can download any file from the specified URL and store it on disk as a file.

The demo-agents in the downloadable sample-database has been updated to use SetPayload, and the other methods are now demoed in a third agent with the name "Test Support Methods".

Happy coding!


10.13.2017

Teach the old dog some new tricks: Let LotusScript consume REST Services the easy way

Tags: : LotusScript Java
0

This article shows you how to consume REST Services in LotusScript like this:

SNAGHTML110bfb33

You can both GET and POST with the classes.

Behind the scenes this is accomplished with two script libraries. One back-end worker class made with Java (class:CWebContentConsumerJava) which does all the heavy lifting, and a LotusScript wrapper class (class:CWebContentConsumer) which uses the LotusScript-to-Java bridge LS2J to interface the back-end java directly.

Click on “Read more” to read the details.


Read more...

07.04.2017

Unexpected results reading a plain text file with NotesStream in LotusScript (or when strings contain MORE than meet the eye)

Tags: : LotusScript
0

This is a little LotusScript experiment with a plain text file and a LotusScript agent using NotesStream. After reading the text from the file I try to use the string to locate a document with a corresponding key in a NotesView. While everything looks fine in the debugger, something is not correct and the lookups fail. This article has some suggestions for solutions at the end but they are not state-of-the-art! Perhaps you know other ways?

First off, I have a super-simple plain text file with a single number in it;

SNAGHTML6c68e14

Then I have a super-simple LotusScript agent reading this text file, and trying to locate a Notes document with the same number from a NotesView.

SNAGHTML6c794b7

The documents have all their numbers stored as text, like this;

SNAGHTML6c802d2

Why stored as text? Because this is how I found the (to me) abnormality in the first place Smile And why NotesStream? Because code with the concept herein also runs on an iSeries, where it works fine …

The LotusScript-code looks like this;

SNAGHTML6d2928f

The code uses a NotesView (1) and a NotesStream (2) to open the file and read out the contents with the ReadText-method (3). Finally the code tries to locate the document in the NotesView first by a hardcoded key (4), and then by the value retrieved via NotesStream (5). In a moment you will see how the first works and the second not.


Read more...

06.22.2017

Is Bluetooth degrading?

Tags: : Thoughts
0

image

Being a programmer I know how hard it can be to get software right. Sometimes it never “get right” and the software have to soar in the flux between working and not working.

I my case I have an Apple iPhone 6S, connected to several Bluetooth devices such as a Garmin 235 watch, a couple of cars and a couple of headsets.

Over the years I experience that the Bluetooth connections have more and more problems. For example I can see that my Garmin 235 watch suddenly has a severe battery problem if it looses the connection the phone. In fact it can drain an ordinary 7-10-day battery life in just some hours, if it looses Bluetooth. Other symptoms are like “hey, shouldn’t the phone be connected with my car now?” or “Ooops, there died the sound in the headset”. Often the solution is to turn off the Bluetooth on my phone, turn off the other device, and then restart everything again. Then everything may work fine … for a while!

Who is to blame? Very difficult to say! It can be a hardware, software or both problem – on both sides of the communication chain! Every Bluetooth enabled device have a physical Bluetooth-radio. The radio have some features that often can be controlled by it’s software, the Bluetooth-driver. Read more about Bluetooth-basics here if you are interested. The quality and reliability of both the radio and the software can of course greatly vary. In other words, you can have crappy hardware with shitty software alongside, and the result is a crappy Bluetooth device. Vise versa you can have top-notch radio with brilliant software, and of course you can have anything in the middle.

Then you want to fix your Bluetooth-problem and start to search the net. Hundreds of pages from forums and blogs suggest all kinds of solutions. All from “install this” and “upgrade that” to “reinstall” etc etc. Of course it is often very difficult to see if you have the exact same problem, and thus if the fixes will actually work for you. Often you end up trying out some of them, and sometimes it works, and sometimes it doesn’t. Perhaps you after a while experience SBM – or “Solved By Magic”? SBM happens when you have done lots of changes, and suddenly things seem to work, but you have no idea which of the tricks that actually nailed it! Believe me, over the years I have probably used hundreds of hours trying to fix hardware- and software problems.

The challenge is – for a layman: Does anybody know of a way to debug your Bluetooth-devices? Just being able to tell which of the components that is the cuprit would be great! I wish there was some kind of “Reference Bluetooth Checker” somewhere. Something that you could connect your device to. After a while, the checker could say how well the device has implemented Bluetooth or not. What if there was Bluetooth “middleman” radio that intercepted Bluetooth-communication between a communication chain, and analyzed the quality and reliability? By the way - I found the company NTS on the net, offering their Bluetooth Testing services. Seems to be a marked for such testing then.

Like it is now, Bluetooth is taking on more and more devices and it is becoming more and more important as a connection-protocol. Unfortunately its performace and reliability is sadly – in my view – degrading.


06.09.2017

ISBG Spring Seminar Success!

Tags: : Thoughts
0

image

ISBG (The Norwegian IBM Software User Group) has just finished it’s 19th Spring Seminar (“Vår seminar”) in Oslo, Norway. For two, intense days, the 50+ attendees has witnessed 15 top-notch sessions. The conference were staged in the offices of PwC in Oslo, very close to the main railway station, and just two blocks away from the hotel. In other words, pretty easy to get to the conference.


Read more...

05.31.2017

How a recent Windows 10 update shoots itself in the foot with IPv6 :-)

Tags: : Thoughts
0

In the start of May 2017, one family-member suddenly experienced “No internet, secured” message hovering over the network icon down in the tray icon area. Sure enough, her machine wasn’t visible on my TeamViewer control panel either, so she was definitely off the grid. Why did her Windows 10 machine suddenly decide to drop network connection?

As always, I start to search the net for similar cases, and as always, tons of different results pop up. All sorts of suggestions too, with some of them pretty lame (“download this and that”, buy hey, we don’t have network access in the first place Smile). Well, searching the net and reading tons of answers, and then trying them out, is just the modus operandi in problem-solving.

The quick answer in our case was that Windows suddenly decide to favor the new address-regime in internet (the IPv6) over the old one (IPv4), and along the way, obviously introduce some errors! In our case we have an old router (DLINK 652) which knows nada about IPv6, and the result was that Windows 10 tries to connect/discover/communicate with some protocol that doesn’t exist on the other side of the line. The end-result is that Windows effectivly shoots itself in the foot, and can’t connect or communicate anymore!

Read more to see the details


Read more...

05.12.2017

Engaged at Engage 2017 in Antwerpen, Belgium!

Tags: : Thoughts
0

Over the years I have attended many Lotuspheres and the latter IBM Connects. What I really enjoyed in the first Lotuspheres, were the intense depth of some of the sessions. Remember C API sessions with difficulty settings? Tree dots meant the real deal! Well, those days are over and generally Lotusphere has become more and more a marketing event. Not necessarily a bad thing, but not the same as “back then” Smile

Over the last years I have seen that the Belgium Engage-conference has gotten more and more coverage, and this year I finally got a change to participate for the first time!

Off we went to Antwerpen! Traveling in Netherlands and Belgium is  literally a breeze with the superfast TGV-train! Within an hour you have traveled from the Schiphol-airport in Amsterdam to Antwerpen, Belgium. 300 km/h!


Read more...

03.21.2017

How to get XPages and Bootstrap3_xxx themes to work (or how to check that XPages is correctly installed)?

Tags: : Lotus Notes Xpages Question
0

Warning – Not that experienced XPages programmer here Smile 

I have been fiddling around with the Single Page Application control in XPages, but I never got it to work properly with the Bootstrap3, or Bootstrap3_flat themes. In fact it only worked with OneUI before FP8. I supect that I have some issue with XPages on the server.

Below you see a screen shot of the result in Chrome;

image

My question is therefore – Does anybody know how to check if XPages is is properly installed on the server? I search around and find some details, but a lot of the information seems somewhat old (2014’ish), and the nomenclature seems different now and pretty fragmented. I guess I am also a little confused about what features that still needs ExtLib and what has been moved to the core product with FP8.


Read more...

03.21.2017

Note to self; "Unable to find valid target platform" means "hey, install the core product first" when installing the Notes client

Tags: : Lotus Notes
0

Unfortunately I managed to completely wreck my Notes client install and and thus I had to reinstall it from scratch.

To be completely sure that there wasn’t any remains left from the old installation, I ran the “Notes Install Cleanup Executable” (NICE) tool found here. So far so good, and Notes vanished from my computer.

Perhaps it has been too long since I had to install Notes from scratch, so my first attempt was to just fire up the latest and greatest Notes FP8 client installer named notes901FP8_win.exe. After unpacking,  the installer complained about “Unable to find valid target platform”;

image

- What?!? “Target platform”, does that mean my OS or what?

A quick search on the net quickly pointed me in the direction of  IBM’s own “Unable To Find Valid Target Platform" When Installing Notes, Due To a Suspended Installation. Perhaps being baffled about the message in the first place, and somewhat afraid of that the Notes installer perhaps was outdated on Windows 10 (see what a that talk about a dying Notes client can lead too Smile), my speedreading just saw a bunch of Registry tweaks …

So, after reading it again I finally saw “Usually this error occurs when the user attempts to install a Notes Fix Pack over a nonexistent base version”…. And suddenly my brain remembered that I should install core product first before upgrading to the latest fix pack.

After installing the DOMINO_DESI_ADM901_32_BIT_WIN_EN.exe and then installing notes901FP8_win.exe, everything was back on track Smile


03.16.2017

[SOLVED] - Post FP8 install - Does anybody know where the Xpages "Mobile" controls palette has gone?

Tags: : Lotus Notes Xpages
0

Update March 16th, 2017: Maire Kehoe (one of the lead developers on the XPages team as far as I remember) posted an answer on this blog and that was “The Mobile controls no longer appear in the palette by default. To re-add them, go to the menu File, Preferences, Domino Designer, XPages, Palette Check the check-box beside: Mobile and click OK.”. There it was;

image

Thanks Maire!

Original post follows;

After installing the latest and greatest FP8, I realized that the Extension Library shifted a lot of components from ExtLibX into the ExtLib.

One thing I can’t seem to find any more is the “Mobile controls” – which contained the “Single Page Application” wizard amongst other things.

Does anybody know the whereabouts of the Mobile controls in the post-FP8 world?

SNAGHTML23315c7


03.09.2017

Ahhh, feels good to have FP8 (and iNotes working again) in place!

Tags: : Lotus Domino
0

SNAGHTML23939d22

For some reason the client installer would’t run smoothly unless I killed NSD first (had this problem back with FP5 too). Well, with NSD out of the way, the new version installed without hickups.

On the server, everything went smooth! Took a while longer (approx 15-20 minutes) compared to other updates, but that doesn’t matter as long as the install works!

And, finally the iNotes client worked again!


03.03.2017

Finally I managed to stop the SMTP hacking, generating tons of "SMTP Server: Authentication failed for user ..."-messages

Tags: : Lotus Domino Configuration Spam
0

Have you ever seen a bunch of these in your Domino log-database?

image

If so, you are the victim of attempted SMTP Hacking. It means that someone is trying to log on to your server via the SMTP protocol. SMTP was primarily constructed for functionality and not so much security Smile

Unnecessarily to say, it is a waste of cycles to have all this traffic hit your server, not to mention what could happen if they ever succeed entering the system! Obviously the perpetrators uses some sort of directory attack trying out both known and valid mail addresses, in addition to all sorts of other names.

Read on to see how I finally was able to stop specified IPs from even reaching the Domino server (hint, the Windows Firewall comes to rescue!)

Update March 7th, 2017: David Brown over at his site https://port1352.wordpress.com (love the port1352-name!) took the time to chime in and tipsed me about his blog-post Disable SMTP-AUTH To Stop Relay Hackers In Their Tracks . I had actually seen this post too, but I could not get my head around that it would could actually be better to turn off SMTP-authentication in order to have better security. I asked a question on his post, and he posted a thorough answer to why this might be a good idea here. Thanks David for taking your time to answer this question!


Read more...

02.24.2017

How to quickly get a nice looking month-calendar together with SmartNSF

Tags: : After Hours Lotus Notes
0

Update Feb 28th, 2017: It turns out that Klaus Bild and Christian Güdemann had a presentation at IBM Connect 2017 diving into SmartNSF. I recommend you to head over to see the slides from the session DEV-1478 – Your App Deserves More – The Art of App Modernization for even more details!

===

Have you ever wanted to get a nice looking month-calendar based on your Domino data? Sure you have! Perhaps something like this;

SNAGHTML59cbc42

This is my short take on how to use the fullcalendar.io javascript event calendar together with the fresh SmartNSF-tool from Christian Güdemann on OpenNTF.

Here you see the end-result (go to June to see some data if interested).


Read more...

02.22.2017

How to setup Gmail's smtp.gmail.com as the outgoing mail server on both Domino and on iOS

Tags: : After Hours Lotus Domino Configuration
0
One of the fun things with software, and perhaps especially server software, is that there is lots of ways to get things done. Sometimes you just drown in settings, configurations and restarts. Suddenly things start to work, and you really don't know exactlywhat fixed the problem! This is a story along those lanes, and I write about primarily to remember the steps for later for my own part. Perhaps it can be beneficiary to others too.
 
From having my own Domino server and using it for both incoming- and outgoing mail, things has transformed over the years to only handle incoming mail, and relaying outgoing mail to other SMTP-servers. In my case it has been the Telenor server "smtp.online.no" for many years. Up til now I have been very satisfied with Telenor and smtp.online.no too. If you are interested, you can read more about the history of my server at the end of this article.
 
The Problem

However, in January 2017 something happened on the the Telenor-side, and suddenly their SMTP-server wouldn't accept relayed mail from my server anymore.
 
Sending mail from my Domino server quickly resulted in the following log-entry, along with a non-delivery report sent back to the sender
 
06.02.2017 23:06:48   Router: Message 00796504 NOT transferred via SMTP to SMTP.ONLINE.NO for some.recipient@somewhere.com 553 5.3.0 <some.recipient@somewhere.com>... We do not relay from 84.202.240.155
 
If I tried to send from my iPhone or iPad, which also had the smtp.online.no as outgoing mail server, I received this;
A picture named M2
The above is in Norwegian, and says; “Cannot Send Mail – A copy has been placed in your Outbox. The Recipient {name} was rejected by the server.”
 
I have now been in touch with the support-departments for both Canal Digital and Telenor, and to make a long story very short; Hopelessly problematic to get any sensible answers at all!!!


First Canal Digital: From filing a support-request via their own support-pages, I didn't get any answer at all. First when I posted on their Facebook-page, they answered instantly!
So, note-to-self, don't bother to write anything in support forms or send email, that won't be answered anyway. Only use channels that obviously hurt a little if requests stay unanswered. That must feel like the other side of the coin for Canal Digital…
The answer to my problem? Canal Digital just points to Telenor and basically says "it's their fault, we do nothing with mail".
 
Ok, over to Telenor, and a very similar story unveils with them. Sensible enough they don't have a Facebook page where customers can rant (they have learnt the lesson that Canal Digital is learning …) However, after registering a couple of cases, were the latter pointed to a huge document with very detailed information about the problem, I finally got an answer today;
 
We don't do e-mail support at all via e-mail ….

 
….. Ha ha ha, are you kidding me?!?! No e-mail support via e-mail ?!?!? (choke choke …)
 
However, they points me to Telenoreksperten, a call-center charging you no less than approximately USD 3 per minute. I guess this is no other logic than if your washing machine breaks down. Nobody will even touch your washer if you don't stuff their deep pockets full of money ….

Read more...

02.21.2017

Classic LotusScript: When 100.0 isn't 100.0 anymore?!

Tags: : LotusScript
0

Today I had to debug some old code, and when doing so I stumbled over something which I found strange.

LotusScript would not consider the value 100 equal to the value 100 … Let me explain with some simple code (you can click on every image to get a larger one by the way);

SNAGHTML148d4a90

I put the above code in a test-agent.

Marked by 1, I set my reference value to the value 100 (and yes, by purpose I don’t use the forced floating point notation 100.0)

Marked by 2, I fill my array of 12 doubles with 1/12 of 100 each.

Marked by 3, I compare the two variables dblOneHundred and dblHundred.

Below you see how the array look in the Designer’s Debugger;

image

As you see LotusScript does a nice job of converting my division (100/12) and storing it as a doubles. For each time I fill in an element in the array, I accumulate the values in the variable dblHundred. Again LotusScript seems to do this nicely. Below you see what it looks like after I have run the loop 11 times;

SNAGHTML1495daf2

… and when the array is completely filled, the Debugger shows that the variable dblHundred has the accumulated value of 100. Below you see the code just before the comparison line marked by 1 is executed;

image

As we see in the debugger, both values are shown as 100 in the debugger, and I would believe that the comparison would be true. But no

SNAGHTML149cb595

If you want to see more, both on my take for an explanation, the workarounds including code to try out, please continue to read below.


Read more...

09.14.2016

[SOLVED] - Does anybody have a cure for extremely small fonts in some incoming mails?

Tags: : Lotus Notes Question
0

Update (only a couple hours later than the post). Thanks to Howard and Jay Marme (unfortunately no link) I learned that I can use the Notes.ini keyword setting BrowserRenderNoFilter=1. When doing so, everything started to work fine!

See the original question at the bottom of this post!

Before (extremely small fonts!) After BrowserRenderNoFilter=1
image image

You can find more on BrowserRenderNoFilter and it’s sieblings BrowserRenderDisable and BrowserRenderPrintNotes here. I copy the text here:

Notes 8 uses Internet Explorer to render MIME emails.
This comes with benefits of better rendering but some emails can take longer to render. There are are some ini variables that control this behavior.
The ini variables in place are
BrowserRenderDisable=1 Don't use the feature at all
BrowserRenderNoFilter=1 Don't run the mail through the active content filter (filters possible security problems from IE issues). Turning off the active content filter may help it run faster.
BrowserRenderPrintNotes=1 When printing from the document, use the Notes rendering and not the browser's
It can also be turned off by deleting the $BrowserRender item on the Memo form in the mail template.
Also noted on the call: This feature works on the basic client with a template refresh to the perweb.nsf database.


Read more...

04.04.2016

iPhone memory constraints? Make iOS clean up by renting a huge movie from iTunes Store!

Tags: : Thoughts
0

Some time ago I wrote a post titled Hmmm, a restore of my iPhone 5S found and freed 7,3 GB from nowhere?! Obviously iOS hasn’t become much better with the latest iOS 9.3 and 9.3.1 and on my phone something keeps eating the memory, and iOS can’t keep track of it. I hoped apps like iRefresh Pro could help me free something, but it only frees minimal amounts of memory.

Today I found this post on Reddit - and the trick freed 1 GB on my phone instantly!!! Others have regained much more!! Obviously Apple is pretty keen on renting a movie to you, so they do much memory cleaning much better  Smile

Simply do the following:

  • In the Settings -> General -> About, check how much memory you have left. Let’s say you have 1 GB left.
  • Open iTunes Store and find a huge film (such as Lord of the Rings or War and Peace from 1957). The trick is to choose a larger film than the available memory on your phone. The two mentioned films are about 6.5 and 8.9 GB in size.
  • Rent the film. iOS will think for a moment and discover that you don’t have enough memory available. You won’t be charged as you couldn’t download it.
  • Click Settings to manage your memory. You should see an increase of your available memory!

03.26.2016

iOS 9.3 on an iPad 2 == Bricked iPad

Tags: : After Hours
0

First it nagged me about the new update: My old iPad 2 kept popping up the dialog box informing me about the availability of the new iOs 9.3.

Then I gave in: Yesterday I finally gave in an started the update process. EVerything downloaded OK and seemed to install OK too.

Did it work? Unfortunately no - Everything when fine until when the newly updated iPad wanted to authenticate with Apple.

After several minutes I got this message;

image

“Your iPad could not be activated because the activation server is temporarily unavailable. Try connecting your iPad to iTunes to activate it or try again in a couple of minutes.”

Well, this seems like an endless authentication loop.

Then you see it: When you start searching the net you pretty soon see a pattern. Loads of people have experienced the same problem, and loads of people now have a bricked iPad!


Read more...

03.18.2016

Windows 10: I finally stopped Windows from hijacking my file assosiations

Tags: : After Hours
0

Rome wasn’t built on one day, and neither was Windows Smile

Albeit all the cool new ways to change default applications, most of them didn’t work for me - and Windows hijacked all my file assosiations again. I blogged about that here Super-annoying "feature" in Windows 10 - It keeps hijacking my file associations!

The following trick worked for me! Simply right-click on a file, and click the Change-button to change the default application for the file type.

image


03.16.2016

The labyrinths of Bluetooth - or - how my Nissan Qashqai lost it"s audio (and finally got it back!)

Tags: : After Hours
0

imageBluetooth is one of the small technological wonders that surrounds us. Connect almost everything together to enhance the “thing-experience”.

For example I have connected my car’s audio system (a 2012 Nissan Qashqai) to my iPhone 5s, and thus I can listen to audio stored on my iPhone. Great for learning a language when commuting!

A couple of days ago, the sound suddenly died in my car! The “head unit” (the display and all the buttons) with the navigation, radio and phone controls all seemed to work - albeit no sound!

Read on to see my endeavor to get the audio back Smile


Read more...

Tags

Calendar