Oracle Mobile Cloud Service (MCS) is a PaaS solution for creating mobile backends and connectors to mobile applications. I’ve done a workshop with it some time ago and you can read all about it at the Whitehorses Blog.
Time Machine issue: not able to activate time machine
What if you always use OS X Time Machine for your backups and find out that restoring doesn’t work as you hoped? I found out recently that the “Activate Time Machine” option didn’t work anymore. It was accessible in the menu, but clicking it did not give a response.
I scoured the internet for a solution, went through all my log files and even did a complete restore (fortunately that still worked!). Still, not being able to restore specific files, I tried a desperate last option: removing the Time Machine backup disk from the selected backup disks in the options, and re-adding it. The good thing is that Time Machine will resume backing up in the same sparse bundle. The best thing is, though, that restoring files from Time Machine works as it should. This problem gave me a lot of head aches and frustration, so I’m very happy I found this solution.
Check these great Oracle JET blogposts
I just want to bring some nice blogposts on Oracle JET to your attention. Oracle JET is a new Javascript Extention Toolkit (yes, yes: JET) from Oracle for interacting with Oracle products and Oracle Cloud services.
They are written by my colleague Herman Brunnekreef. This are the topics:
Visualizing data with Oracle JET,
Routing and responsive Layout with Oracle JET,
Integrating Oracle Map in Oracle JET
Go check them out. My guess is more blog posts about the subject are coming up 🙂
Running XCode simulator results in “LaunchServicesError error 0.”
So, one moment you’re app was running fine in the simulator and the next moment you get an error saying “The operation could not be completed. (LaunchServicesError error 0.)”
Bummer! When you check your logs (see ~/Library/Logs/CoreSimulator/CoreSimulator.log or ~/Library/Logs/CoreSimulator/[Device UDID]/system.log) you’ll find errors like “/<app name>.app did not have a CFBundleIdentifier in its Info.plist}”. And when you check your Info.plist all is fine there.
Don’t despair. You probably created a folder “Resources” in your Project Navigator. And while that’s a perfectly reasonable name for a project folder, XCode does not like that. All you have to do is rename the folder and chances are your project will run again.
Javascript keyboard events: the difference between keypress and keydown
Some things you learn the hard way. I was trying to catch some keyboard events in order to replace comma’s with dots in html input items and validating the input against a regular expression along the way. The results I got were at best confusing, but never as expected.
I did some reading on sites like http://javascript.info/tutorial/keyboard-events, and found out there is a fundamental difference between the keypress and keydown event. This shows especially when catching the “.” “,” or decimal point (yes, the decimal point on your numeric keypad is another character!)
The next output is consecutively a comma, a dot, and a decimal point on the numeric keypad. The keydown and keyup event present values that are unexpected, like the ¼ character. Only keypress shows comma and dot as expected.
keydown keyCode=188 which=188 charCode=0 char=¼
keypress keyCode=44 which=44 charCode=44 char=,
keyup keyCode=188 which=188 charCode=0 char=¼
——————————
keydown keyCode=190 which=190 charCode=0 char=¾
keypress keyCode=46 which=46 charCode=46 char=.
keyup keyCode=190 which=190 charCode=0 char=¾
——————————
keydown keyCode=110 which=110 charCode=0 char=n
keypress keyCode=46 which=46 charCode=46 char=.
keyup keyCode=110 which=110 charCode=0 char=n
Remember this when getting unexpected results when grabbing key-events in your web application.
Provisioning to your device is now free with XCode for iOS
Maybe I’m a little late to the party, but apparently this information is known by not so many people.
Since XCode 7 you are now able to provision (or install) to your device without a paid developer account.
However, it may be possible that it still doesn’t work for you. In that case, try the following options, as mentioned in the release notes.
-
Accounts with expired Apple Developer Program memberships may not be able to use free provisioning. (20486606)
Workaround: Create a new Apple ID and enter it into Xcode’s Accounts preference pane.
-
The list of teams displayed within Xcode’s Accounts preference pane may not update to show your new free provisioning team. (19775448)
Workaround: Remove your Apple ID and add it again in Xcode’s Accounts preference pane.
IBM released a SWIFT language sandbox in the browser.
Just a few days ago, IBM released a sandbox for Apple’s SWIFT language, and it works in the browser. I think that’s great news, now there is a convenient and easy way for everyone to become acquainted with SWIFT.
The news is also noteworthy because the site is announced only a few days after Apple put their money where their mouth is and made SWIFT available in the public domain. There must have been some collaboration between the two companies. IBM and Apple are working ever closer together. Remarkable, knowing that the two have been rivals for years.
I’d suggest you give it a try on http://swiftlang.ng.bluemix.net. In the upper left corner there are some sample projects to get you started. There is some more getting started on the IBM blog.
refreshing PL/SQL regions with AJAX in Oracle APEX
Not all regions in APEX can be refreshed using the PPR mechanism. Especially PL/SQL regions are difficult to refresh with AJAX.
Although… the fact that the HTML in a PL/SQL region is constructed in PL/SQL may be in your advantage. With the use of a tiny bit of JQuery and an application process, you will be able to update a region asynchronously. I’ll show you how.
First, create a PL/SQL region and write some PL/SQL that generates your report using the htp.p and alike functions. Make sure that your code is placed in a database package, let’s say we call the procedure apx_report.emp_report. Add a class or ID to your table so you can refer to it from Javascript. In this example, I’ve named the ID “EmpTable”.
Next, create a new application process, type On Demand and name it refreshEmp. Call the procedure you’ve just compiled in the process source.
Now create a dynamic action that fires on the event you want your region te reload, for instance an on-change.
The True action is of type “Javascript” and contains the following code:
apex.server.process ( "refreshEmp" , { dataType: "text" , success: function (pData){ $( "table#EmpTable" ).replaceWith(pData); }}); |
That’s all! The javascript function apex.server.process calls your application process “refreshEmp”, but the trick is to feed the result from the pl/sql procedure ( put in pData) to a jQuery function, which replaces the content of your current table with the new data. It’s fast, and very non-obtrusive to the user.
There is one last thing. You might notice that other dynamic actions in the region will stop working after the AJAX call. That is because, when refreshing that part of the page, you lose all event handlers to the DOM objects there. In jQuery you solve that by replacing the $(“.whatever”).click(function() { //other stuff }) by $(“.whatever”).on(‘click’, function() {}) . It’s a tiny bit easier in APEX.
Remember the Advanced section in your Dynamic Action? There’s a select list called “event scope”. Go to the dynamic actions that trigger on the AJAX region and change the Event Scope to “Dynamic”. Also enter the ID of your region (that’s the one you set in the Region properties) as a jQuery Selector, e.g. #EMPREGION. You’re set and done now! I think it’s a big improvement over reloading the entire page.
The latest Whitebooks: improving performance with OSB split-join and Behaviour Driven Development in Scrum
There are a couple of interesting new articles on the Whitehorses knowledge site. All in Dutch, but Google Translate can fix that for the none-Dutch speaking audience.
Remco Cats has written an article about Behaviour Driven Development, a new concept in Scrum. It should help reduce the amount of left-over testwork at the end of the scrum, and improve the communication in your team. Read here how Behaviour Driven Development works.
The article about OSB split-joins is written by Peter Holtland and explains how you can enrich your data during transformation using the split-join in OSB, and the performance improvement you get with this technique. Read all about the split-join here.
I already mentioned my own whitebook in the previous post, but if you haven’t found it yet, read about calling REST services and decoding JSON messages with some populair programming languages.
Prevent your webform from showing the “are you sure you want to leave this page” message
When a webpage in your application detects changes made to input items (if they are valid or not), it will present the user a popup asking if he/she wants to leave the page or stay on the page. Although that is useful in many cases, sometimes you just want to switch it off on a specific page. The solution is really easy.
Place the following Javascript in the onLoad event of your page:
window.onbeforeunload = null;
In for instance, Application Express, you can put it in the Execute when page loads item in the Javascript section of your page.
If you want to show a different message, just replace the null with the message between double quotes.