How can I add my jar file to automatic imports for Scala language in beaker-notebook? - beaker-notebook

I want to add my Scala internal library jar file in beaker-notebook Scala language so each time the user creates a new notebook, our library is configured to be automatically imported. Is that possible? How?

You can add your jar files in Language Manager under Class path (jar files, one per line) box.

Related

Is it possible to export/import Project.params within SSIS?

Does SSIS 2012 allow to export settings of a project located into Project.params for a further import into another project?
You can simply copy and replace the Project.params file in your new project with the file from the existing project. This obviously overwrites any existing project parameters. If you have need, you can patch the two XML files together just add/remove SSIS:Parameter tags as required.

How can I import JSON data from a REST API into BIRT?

I want to use BIRT to generate reports against data that comes from a JSON based REST API. How can I import this data?
The process for doing this is described at http://developer.actuate.com/community/forum/?app=blog&blogid=45&showentry=471, but it turns out that there are a few important steps missing. I'll fill in a few blanks here.
The original instructions describe creating a Scripted Data Source, with an "open" script that makes use of the com.actuate.json.JSONParser class. First, it is important to realise that this class is not part of BIRT, and needs to be manually added (along with any dependencies).
The download provided by the original instructions provides the com.actuate.json.JSONParser class, but leaves it up to you to source the dependencies. To make things easier I have reimplemented the JSONParser library in Maven, which will then download and package the dependencies for you. It also includes some bug fixes and enhancements like GZIP compression support. You can get the Maven project from https://github.com/mcasperson/birt-jsonparser, and to build the JSONParser library and package the dependencies, run the command
mvn clean package dependency:copy-dependencies
This will result in the birt-jsonparser-0.0.1-SNAPSHOT.jar file being created in the target directory, and all the dependencies copied into the target\dependency directory. Copy all of these JAR files into the {BIRT_INSTALL}/plugins/org.eclipse.birt.report.viewer_{BIRT_VIEWER_VERSION}/birt/scriptlib directory to allow the JSONParser class to be accessed from within your BIRT report.
If you want to debug your report, these JAR files will also have to be referenced in the Debug profile.

Configuring DisplayTag for individual pages

I have too many modules (around 90) in my project.
But I want to keep individual displaytag.properties file for each module rather than having single file for whole project.
How to achieve this.
I am using struts2
I think that you can configure each displaytag using the appropiate bundle, remember the bundle search order from S2 docs:
ActionClass.properties Interface.properties
Interface.properties (every interface and sub-interface)
BaseClass.properties (all the way to Object.properties)
ModelDriven's model (if implements ModelDriven), for the model object repeat from 1
package.properties (of the directory where class is located and every parent directory all the way to the root directory)
search up the i18n message key hierarchy itself
global resource properties
and from the docs for the DisplayTag library:
For the whole web application, create a custom properties file named "displaytag.properties" and place it in the application classpath. Displaytag will use the locale of the request object to determine the locale of the property file to use; if the key required does not exist in the specified file, the key will be loaded from a more general property file.
so i guess that the displaytag will search the config keys in the s2 available bundles.

Referencing ActionScript file

I have a process set up to create action script files. They hold functions that are called upon by my flash project. How can i reference these files so that the project knows the functions are there.
with asp.net i would simply reference the .js file. Is it the same process?
The process of importing files to be used by Flash is pretty straightforward:
At the top of each external file there will be a package declaration, it basically represents it's path from the .fla file.
For example:
package com.site.objects
The above represents an ActionScript file within a folder objects, within site, within com whose parent folder also contains the .fla file.
When you're importing external files, you always start from the directory containing the .fla. This is always necessary with the exception of importing external files that are in the same directory as the file you're trying to access the class from.
The import statement for the above example will look like this:
import com.site.objects.MyClass;
Once you've done this, you'll be able to:
Create instances of the imported class.
Access static properties and methods defined within the class.
Extend the class to create a new class which will inherit it's properties.
etc

How does the Gaia Flash Framework access the scaffold.as file?

In the Gaia Flash Framework, a file called 'Scaffold.as' is used to make each page a scaffold page. This is accessed by the code,
new Scaffold(this);
But the class itself does not appear to be imported. Am I missing something about the way flash handles external classes? Or is there something else pulling it in?
Any help appreciated.
This all depends on how you are compiling. I'll assume you are using Flash IDE to compile. Flash has a source path lookup mechanism. This can be accesed through the fla (under File->Publish Settings->Flash (tab)->ActionScript). If the file Scaffold lives at the root level of a class path then there is no need to import it. The default class path includes the directory the Flash file resides in and some Adobe directories. There is a mechanism for managing class packages ... I think it was the old Macromedia Extension Manager. It would copy classes into the default class paths when the package was installed - so that could be the case. I have no familiarity with Gaia itself.
So there are 3 options. First the file Scaffold.as is in the same directory as your fla. Second the file Scaffold.as is in a default Adobe include directory. Finally the file is in a directory referenced in the fla's class path.