Thursday, February 19, 2015

What is JSON ?

JSON stands for Javascript Object Notation.
Some descriptions are:

  • Format for sharing data
  • Derived from Javascript
  • Language independent (Originated with Js but availabe in many other language like PHP, C, Pearl, python)
  • An alternative to XML

Advantages:
  •  Leaner than XML
  • Easy to read
  •  Growing support in APIs
  • Natural format for Javascript
  • Implementation in many languages

Wednesday, January 14, 2015

Add a CSS file in Intrexx

As you already know you can directly write your CSS code in intrexx without any issue. But if  you have, say a third-party CSS library or a CSS file that you want to add in intrexx you need to be aware of the following fact:
  1. Put a copy of your CSS file preferably in this directory or any other location:  \org\yourPortalName\external\htmlroot\include\custom\
  2. Open the following CSS file (\org\deinportal\external\htmlroot\include\custom\custom.js) and add the following:  
    Loader.loadCssFilesOnDemand('yourCssFile.css');
  3. Save everything and reload  your application
Enjoy it.

adding jquery plugin in intrexx

As you already know you can directly write your javascript code in intrexx without any issue. But if  you have say a third-party javascript library or a jquery plugin that you want to add in intrexx you need to be aware of the following fact:
  1. Put a copy of your plugin in this directory:  \org\yourPortalName\external\htmlroot\include\custom\
  2. Open the following js file (\org\deinportal\external\htmlroot\include\custom\custom.js) and add the following:  Loader.loadJsFileOnDemand("include/custom/yourScriptName.js");
  3. Save everything and reload  your application
Enjoy it.

Friday, January 2, 2015

jquery NaN error

I have just written a small script today with jquery and come across this small error message.
inital code:

var1 += parseInt($(this).html());
var2 = parseFloat(age);

Solution

    var1 += parseInt( $(this).text(), 10 ) || 0;
  var2 = parseFloat(age) || 0;
 
Hope it helps. 

Sunday, December 28, 2014

qt fatal error qdialog no such file or directory #include

In the process of compiling your cpp file in linux under QT 5 or more you may receive such  a weird fatal error message. If you are wondering where and how to start solving it here is the solution for you. Just go to your projectFile.pro and add the following on the top (before headers):
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

Special credit goes to AB Bolim stackoverflow

Hope you enjoy it