Posts
Africa- part1 - Livingstone - Victoria Falls
- Get link
- X
- Other Apps
The best trip of 2014 When: August 2014 Where : Zambia->Livingstone-VictoriaFalls->South Luangwa national park->Zanzibar We flew from Geneva via Frankfurt-Ethiopia (Addis Ababa airport) by Ethiopian Airlines. The Addis Ababa airport was very small, we had 2 hour halt while going and 4 hour halt while coming back. We flew into Lusaka , where we stayed there just for a night. From Lusaka, next day, we took Proflight Zambia flight, a 30 seater, 1 hour flight to Livingstone. They served amazing muffins and sandwiches in the flight as well ;) :D. In Livingstone , we stayed in the center at Fawlty Towers ( 216s Musi o Tunya Road). Its a backpackers place and we loved it. Location was perfect, just opposite to the supermarkets and restaurants, and only 15 mins from the airport. The place was really nice, calm, extremely clean, with a nice swimming pool. Every afternoon at 3 pm they used to give free pancakes ( actually crepes ;) , which were a treat with coffee. T...
Create New File Type resolver and associate the data type in Netbeans
- Get link
- X
- Other Apps
1. make a new xml Document ( eg, PdbResolver) 2.choose DTD Constrained Documenton the second page of the new Xml Document wizard 3. On third page, in the DTD Public Id, choose, -//NetBeans//DTD MIME Resolver 1.0//EN, from the drop down menu 4. save it 5. make a new java file , call it as DataObject ( eg: PdbDataObject), write ur code... 6. save it, and add @MIMEResolver.Registration(displayName = "PdbResolver", resource = "/alifea/gui/PdbResolver.xml") for registering the mime tyoe to the data object file 7. In the layer file add <folder name="x-pdb"> <folder name="Factories"> <file name="PdbDataLoader.instance"> ...
Understanding Bayesian Belief Networks, and their Inference
- Get link
- X
- Other Apps
Create a Floating/Undocked Non-sigleton Window in Netbeans
- Get link
- X
- Other Apps
first of all some really useful links on this topic: http://netbeans.dzone.com/news/secrets-netbeans-window-system https://blogs.oracle.com/geertjan/entry/case_study_customizing_the_netbeans http://forums.netbeans.org/ptopic15413.html To create a TopComponent which is undocked by default, one need to define an undock (or floating ) mode. To do so, create a new XML file and call it "newModeUnDock.xml" Wriet following in the file: <?xml version="1.0" encoding="UTF-8"?> <mode version="2.3"> <name unique="newModeUnDock" /> <kind type="editor" /> <state type="separated" /> <constraints> <path orientation="vertical" number="0" weight="0.5"/> <path orientation="horizontal" number="1" weight="0.5"/> </constraints> <b...
to make custom configuration file for distributed netbeans java project
- Get link
- X
- Other Apps
followed the blog at : https://blogs.oracle.com/geertjan/entry/support_for_custom_configuration_files steps: 1. clean and build the project 2. package the project as Mac Os X Application. 3. copy the project/build/launcher/etc/app.config file to a new file at project/nbproject/ and rename it as my.config. 4. Now, change/add the wanted arguments in a new my.config file. for example, add J-d64 -J-Xms512m -J-Xmx2G to the default_options in the new my.config file. and save it. 5. Add app.conf=nbproject/my.conf to the project.properties file. 6. clean and build the project and package as Mac Os X Application, again. 7. check the project/build/launcher/etc/app.config file. It will have the default options overridden .
add/ remove fast action by double clicking the project node
- Get link
- X
- Other Apps
in layer.xml file <folder name="Analysis"> <folder name="Actions"> <folder name="PreferredAction"> add following : <file name="alifea-gui-actions-AddAnalysisAction.shadow"> <attr name="originalFile" stringvalue="Actions/AddAnalysis/alifea-gui-actions-AddAnalysisAction.instance"/> </file> if you want to open the action by double clicking the project node and delete if you do not wnat that
To increase the size of heap memory for a Netbeans project
- Get link
- X
- Other Apps
To increase the size of heap memory for a Netbeans project, do the following: 1. Change -Xms, -Xmx, -XX:PermSize,to the desired memory size e.g : -J-Xms512m -J-Xmx2G -J-XX:PermSize=2G -Xms defines the minimum size and Xmx the maximum. These options are saved in the netbeans.conf file To find the file on a mac, go to Application/Netbeans/Netbeans7.3 right click and choose show Package Content and then go to: Contents/Resources/Netbeans/etc/netbeans.conf 2. Also add the same options in the Project Properties file of the Nebeans Project as well as in Netbeans Platform Config file. ( located in Important files folder of the project) run.args.extra=-J-d64 -J-Xms512m -J-Xmx2G This file can found in the Important Files folder of the Netbeans project. This increases the memory for the Netbeans project also and not only for the Netbeans platform.
To Make Window groups for Non Sigleton Windows
- Get link
- X
- Other Apps
To Make Window groups for Non Sigleton Windows, choose one window as the main window,,i.e., that is the second window can be opened and closed only when first one is present. For example, in my case I have two singleton windows ( as have been described in a different post How to make Singleton windows) or two TopComponents, AlignmentFilterOption and AlignmentView. Here, I have choosen AlignmentFilterOption a my main window. Now in the AlignmentFilterOption TopComponent, (main window) make following changes: 1. make a private TopComponent object and define it as AlignmentView in the constructor private TopComponent tc; tc = new AlignmentView(this.ado.getAlignment()); 2. In componentOpened() function, add AlignmentView object, so that whenever AlignmentFilterOption window is opened, AlignmentView widnow also opens. @Override public void componentOpened() { if (tc != ...
Printing of large double values in JAVA with or without scientific notation
- Get link
- X
- Other Apps
Option 1: Double d= 0.0007 ; System.out.println(d ); System.out.println(double d) Prints a long and then terminate the line. This method behaves as though it invokes print(long) and then println() . print(double d) Prints a double-precision floating-point number. The string produced by String.valueOf(double) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method. So System.out.println(double d) changes double value to String. So 0.0007 becomes 7.0E-4. Option 2: Double d= 0.000000007; System.out.println(BigDecimal.valueOf(d) ); If you use System.out.println( BigDecimal.valueOf(d)), Translates a double into a BigDecimal , using the double 's canonical string representation provided by the Double.toString(double) method. So 0.0007 is printed as 0.00070 but if the double number value is large like, d= 0.000000007 then its bec...
Adding/Updating Java projects from existing sources to Netbeans Project
- Get link
- X
- Other Apps
Task : To update Java projects from existing sources to Netbeans Project Solution : Once you have an updated Java Project, you need to change it also in the Netbeans projects which have dependency on it. So First remove the java project from the sources of Java Project in the Netbeans Platform. Then download the updated version of the java project (e.g, from CVS) and then again add it to the sources of java project of Netbeans. Now, remove/delete the old jar for the java project, to remove the dependency on the old jar. Build and clean the java project as well as the whole netbeans project and again in the nebeans module, add the dependency on the new java project jar. Steps in detail: => Make all the changes in your Java Project and Save it. => right click on the Java Project and go to Properties. => Go to Sources, check the source in which you just made the changes and Remove it. Click OK => Now go to the folder where it stored and del...