|
|
| [matlab][solution][java] Using double or 2d double[][] array in Java JA builder |
Author
ramon fincken
:: Posted: Tue Feb 14, 2012 11:01 am
:: Category: Lounge
If you need to have access to a double use:
for double:
| Code: | | double foo = ((MWNumericArray) result[0]).getDouble(); |
for double[][]:
| Code: | MWNumericArray mytemp = ((MWNumericArray) result[1])
double[][] bar = (double[][]) mytemp.toDoubleArray(); |
especially the 2-dimensional double array was badly documented, so use this to your advantage.
|
| [imagej] Commandline resize image |
Author
ramon fincken
:: Posted: Fri Dec 02, 2011 12:59 pm
:: Category: HTML and other markup&programming languages
resize an image and write the result as PNG
| Code: | /**
* @author Ramon Fincken, http://www.ramonfincken.com/permalink/topic241.html
* @param source
* @param write_to_png
* @param width_factor
* @param height_factor
*/
public void resize_by(String source, String write_to_png, double width_factor, double height_factor)
{
ImagePlus imp1 = IJ.openImage(source);
ImageProcessor ip=imp1.getProcessor();
int new_width = (int)(ip.getWidth() * width_factor);
int new_height = (int)(ip.getHeight() * height_factor);
ip = ip.resize(new_width, new_height);
imp1.setProcessor(ip);
WindowManager.setTempCurrentImage(imp1);
IJ.saveAs("PNG", write_to_png);
} |
|
| [matlab][Solution] Running mysql commands in Matlab on linux (Centos) 64 bit |
Author
ramon fincken
:: Posted: Thu Nov 10, 2011 2:59 pm
:: Category: Lounge
Download the source at http://www.cims.nyu.edu/~almgren/mysql/
Make sure you have these packages intalled:
mysql-devel-5.0.77-4.el5_6.6.x86_64 ( or simular )
mysqlckient14-devel-4.1.22-1.el5.centos.x86_64 ( or simular )
perhaps also this one:
mysql-connector-odbc-3.51.26r1127-1.el5.x86_64
verify that your have mysql.h and libmysqlclient.a
by checking their paths using
| Code: | sudo updatedb
locate mysql.h
locate libmysqlclient.a |
Now visit matlab and mex the whole lot ( you need a gcc compiler to do this ! )
| Code: | | mex -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient mysql.cpp |
adapt your paths so in my case
| Code: | | mex -I/usr/include/mysql -L/usr/lib64/mysql -lmysqlclient mysql.cpp |
the paths can be found using the locate command (see above)
If all goes well .. you 'll end with a new file called mysql.mexa64 and you are ready to start your mysql business!
|
| Solution ubuntu bootloader install failed 11.04 |
Author
ramon fincken
:: Posted: Thu Oct 13, 2011 5:00 pm
:: Category: Ubuntu
I was trying to install Ubuntu 11.04 and it kept failing on the last part .. the bootloader.
Installing grub from live cd did not work either..
Then I unplugged my RAID card which had a RAID 1 set up for my (fstab mount) home drives.
The installation went well afther that!
Do not forget to install dmraid to see your drives again
|
| Forum |
Topics |
Posts |
Last Post |
| General forums |
|
 |
About this blog
Moderator ramon fincken |
4 |
4 |
Mon Jan 05, 2009 5:47 pm ramon fincken  |
 |
Lounge
Chit - chat
Moderator ramon fincken |
53 |
67 |
Tue Feb 14, 2012 11:01 am ramon fincken  |
 |
Reviews
Movie reviews - Goodie reviews and much more !
Moderator ramon fincken |
5 |
5 |
Sun Oct 11, 2009 8:00 pm ramon fincken  |
 |
Rants
Rants about things in daily life ...
|
5 |
11 |
Sun Mar 21, 2010 10:12 pm ramon fincken  |
 |
Ubuntu
A forum about my favourite Operating System!
|
9 |
13 |
Thu Oct 13, 2011 5:00 pm ramon fincken  |
| The world of freelance |
|
 |
Freelancing
Moderator ramon fincken |
2 |
2 |
Wed Jan 21, 2009 9:52 am ramon fincken  |
 |
Coping with clients
Moderator ramon fincken |
1 |
1 |
Thu Jan 08, 2009 12:00 pm ramon fincken  |
 |
Services
I offer many webdevelopment services such as custom coding, photoshop webdesign and W3 valid slicing and basing !
Feel free to ask for a quote !
Moderator ramon fincken |
1 |
2 |
Sun Mar 21, 2010 2:00 pm ramon fincken  |
| Programming |
|
 |
PHP coding
Moderator ramon fincken |
60 |
71 |
Tue Sep 14, 2010 8:45 pm ramon fincken  |
 |
Mysql databases
Moderator ramon fincken |
6 |
6 |
Sat Feb 20, 2010 3:04 pm ramon fincken  |
 |
HTML and other markup&programming languages
Moderator ramon fincken |
20 |
20 |
Fri Dec 02, 2011 12:59 pm ramon fincken  |
 |
Control panels (plesk, cpanel, direct admin)
Moderator ramon fincken |
4 |
6 |
Thu Oct 30, 2008 11:53 pm ramon fincken  |
 |
CMS-ses (Joomla, WordPress, etc..)
Moderator ramon fincken |
30 |
45 |
Wed Aug 10, 2011 11:18 am ramon fincken  |
| Other projects |
|
 |
Antispam
Moderator ramon fincken |
6 |
6 |
Sat Oct 30, 2010 4:37 pm ramon fincken  |
 |
Other projects
Moderator ramon fincken |
12 |
20 |
Sun Oct 31, 2010 11:16 am ramon fincken  |
| Who is Online |
 |
Our users have posted a total of 283 articles We have 12 registered users The newest registered user is accentmedia
|
In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest [ Administrator ] [ Moderator ] Most users ever online was 40 on Tue Jan 05, 2010 11:59 pm Registered Users: None |
| This data is based on users active over the past five minutes |
 |
New posts |
|
 |
No new posts |
|
 |
Forum is locked |
|
|
|