Tampilkan postingan dengan label Programming. Tampilkan semua postingan
Tampilkan postingan dengan label Programming. Tampilkan semua postingan

Sabtu, 18 Februari 2012

How to call Matlab functions from a Java program

Matlab is a very reputed piece of software specially among researchers and graduate students. It allows users to code complicated algorithms thanks to its rich libraries that implement many mathematical functions and statistical models. You may have ever used it to implement some classification processes that deals with heterogeneous data and you have got some interesting results and you wanted to show it to a client. He may not be interested in your statistical model nore in your charts and graphs. He is interested in a beautiful application with an ergonomic user interface with big shiny buttons that allow him to use you piece of program. He is interested in the usability of your program more than the academic process that allowed you to get your result.

So to make this happen, you need to implement a simple prototype that calls your Matlab functions and show resluts in a simple GUI. If you're a Java savvy, or you prefer java to make this happen you need to use the MatlabControl API. It's a simple Java API that allows you to call Matlab functions and execute eval, feval and other commands.

All you need to do is to download the jar file and add it to your classpath and use this code to open a Matlab session.



MatlabProxyFactoryOptions options = new MatlabProxyFactoryOptions.Builder()

.setHidden(true)
.setUsePreviouslyControlledSession(true)
.build();

MatlabProxyFactory factory = new MatlabProxyFactory(options);

MatlabProxy proxy = factory.getProxy();

After that you need to change your Matlab current path to your Matlab script path using CD command and then you can execute call your function:

proxy.eval("cd C:/Users/MyName/Desktop/MyScriptFolder");
proxy.eval("myFunction('"+param1+"','"+param2+"',intParam)");

If you need other details about variables and parameter you can use the API Walkthrough or check out the API Javadocs.


Senin, 02 Januari 2012

Writing Java code in blogger posts

I've been looking for a simple way to help me tweak my blog to show Java code.
This is what I've got after some changes in the blog template.

// Comment
public class Testing {
public Testing() {
}

public void Method() {
/* Another Comment
on multiple lines */
int x = 9;
}
}
All you have to do is changing your blog template and add some scripts so you can use the "SyntaxHighlighter" Library.
It works thanks to this post.

Senin, 06 September 2010

Introducing EXT JS

EXT JS is a javascript library which is build to offer web developers the ability to make interactive web applications using Ajax, DHTML and DOM scripting.

The new tendency in the last deacades in software development is the "rich Internet application". To be close to desktop application, you should have some advanced web

graphic tools and frameworks. Extjs has all the features to allow you to develop your rich Internet application.

The predefined tools such us grid, forms, panels and menus are rendered client-side.You don't have to wonder about compatibility. It's designed to work perfectly on any common browser.

Coding and editing Ext js scripts is fun. Since there are many examples with the downloaded package of the library and it has a very helpful community. These are some Screeshots of what this library is capable of:


Jumat, 28 Desember 2007

Best Free C/C++ IDE

The first question to ask is what does a programmer need ?
To create an application you have to make sure that all these tools are available.
  • A Text editor : To write the code source ( of any language). Basically a simple software as "bloc-notes" under Windows or "vi" under Linux is enough. The best thing is to have an intelligent text editor that make your code colorful and make your codes more comprehensive and easier to read.
  • A Compiler : to compile your source code to binary code.
  • A debugger : To help you to correct the bugs in your code.
Programming demands a lot of effort and concentration and you have to pick the tools that can make your life easier! You can look for these components separately but this will be like torturing yourself! You should pick 3 in 1 software called IDE : Integrated development environment.

Best Free C/C++ IDEsBoth of them are free and simple which make of them the best tools for beginners.
Note that both work on Windows and only Code::Blocks can run on Linux. And for Windows vista users you should follow some particular procedures to set up thes IDE or else you'll face many bugs with compiling. Nevertheless, Visual Studio Express work correctly on Vista.
For mac users, I recommend "Xcode". You can install it from the CD of Mac OS.

Sabtu, 22 Desember 2007

eZ Publish CMS 4th version : all the features you need


CMS are Content management systems created to make creating a website an easier task. Among many others, eZ Publish has some unique criteria. It's a flexible and extensible CMS created by eZ Systems, a Norwegian company was behind the PHP eZ Components Library, eZ Publish is an ECMS ( Enterprise Content Management System) distributed under both GPL and proprietary licenses.

eZ Publish offers a great number of features: document publication, as text and multimedia files, is possible once the software is installed. Integrated solutions gives you the possibility to manage : Web shop, news, a social website, a personal website, photo gallery, forums and polls...

Mainly dedicated to enterprises, eZ Publish included many features as : Product catalog, the caddie function, tax and promotion management, sells stats and sending management using a secured payment system.

For developers, such features are implemented in eZ Publish 4: Classes and object definition, parametred and programmable workflows, WebDAV interface and clustering..

Where hides the revolution !
After many bugs corrections, the fourth version is a revolution by being the first version using PHP 5. So many new features are available as autoload, DOMDocument...
Another new thing, eZ Flow. It's a new extension dedicated to media publication using the WebDAV technologies. The import/export communication with ODF you can stream Flash and videos in eZ Publish.

Ameliorations:
eZ is more efficient with ameliorated scripts and a reorganization to the XML. The new versions also allows you to use eZ Components Library in the extensions. A great importance is given to the famous Web 2.0 by giving many features to publish pages with tag clouds, photo galleries, blogs...etc..

The eZ Publish community counts about 25000 members, composed by 2000 reference clients, 2 millions downloads and a network counting 200 partners.

Related links
Official eZ systems website
download eZ Publish 4.0
eZ components

Rabu, 28 November 2007

Graphic solutions for web developers.

A web developer isn't a designer. You can be a PHP genius but you you're pages won't be attractive as some designers do. I feel frustrated when my own PHP chat page was badly presented while I spent hours to fix the code. I'm not a photoshop expert and I really don't have the artistic touch to treat pictures and create my own banners and buttons. Fortunately, we can find everything we need on the net.

The round corners pictures.
Round corners was my first source of frustration until I found this website which allows you to get your round picture in a second ! Round corner pictures are really sweet to present and I highly recommend it.


Curvy corners
Still dealing with the same problem here; the curvy corners. I liked the website dedicated for this issue. It gives you some tips and tutorials about making your own curvy corners and how to blend your header with the background color.


Javascript effects
Actually I don't recommend to use too much javascript in your page even if you like the effect that it makes because it will slow down your page loading and your visitor will hit the "X" button before he can see anything of your content but there are some light scripts that you can use as the javascript menu.
All you need to do is to download a javascript editor like this one and start to make your own scripts or download this free javascript menu maker .
Beware that you're code must fit most browsers or else your visitors will start complaining abou the bugs on you page.

Sabtu, 17 November 2007

XHTML/CSS newbies paradise tutorial

Newbies paradise a programming community dedicated for newbies where you can find free tutorials written in a unique way, very simplified and detailed rich with examples. This community is very famous in its French version, counting about 100000 member and as proof of its quality we represent you a sample of its tutorials.



This tutorial contains the following parts:
Related Posts Plugin for WordPress, Blogger...