Monday, June 23, 2014

BakBak New Schedule A Video Call widget.

We have introduced a new "Schedule a video call" widget on BakBak. This would function in a way that it would sending meeting invite to the website owner and the scheduler with a link to join video call. Meeting invite allows the schedule to be integrated with the calendar which can be moved around based on the Account owners and Customers Calendar. And as it sits on the calendar all the calendar functionality would work. The video call can easily be joined by clicking on a simple link on the calendar. A true 1-click solution.

The widget can be embedded anywhere from your blog to webpage to on a bakbak!

Please do schedule a call with me by using the widget below:

How to call js code/file in Java?

Found this interesting part which could possible used in a number of ways like a rule engine. If I would have known this before might have considered this approach over Jexl, or would have evaluated for its performance compared to JEXL. 

But for sure have other use cases like testing, data crawling, etc.

Calling into Javascript scripts from Java code:
Calling Java objects from a script is only half of the story: The Java scripting environment also provides the ability to invoke scripts from within Java code. Doing so just requires instantiating a ScriptEngine, then loading the script in and evaluating it, as shown in Listing 5:

Listing 5. Scripting on the Java platform
import java.io.*;
import javax.script.*;

public class App
{
    public static void main(String[] args)
    {
        try
        {
            ScriptEngine engine = 
                new ScriptEngineManager().getEngineByName("javascript");
            for (String arg : args)
            {
                FileReader fr = new FileReader(arg);
                engine.eval(fr);
            }
        }
        catch(IOException ioEx)
        {
            ioEx.printStackTrace();
        }
        catch(ScriptException scrEx)
        {
            scrEx.printStackTrace();
        }
    }
}


The eval() method can also operate against a straight String, so the script needn't come from a file on the filesystem — it can come from a database, the user, or even be manufactured within the application based on circumstance and user action.