To start Jboss apply the following command;
/var/jboss7/bin/standalone.sh
Tuna TöreTo start Jboss apply the following command;
/var/jboss7/bin/standalone.sh
Type the following command first to connect mySQL DB from command line;
C:\Users\tuna>mysql -u root -p
Enter password: type your db password here
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.5.25 MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql>
mysql>source C:\file.sql
and after pressing enter, import will be started
If you exported a dumb file using mysqldumb before use the following command to import db;
root@ubuntu:/home/tuna/Desktop# mysql -uroot -pyourPassword yourDBname < dumbFile.sql
[root@server ~]# mysqldump -u root -pYourPassword dbname > tofile.sql
[root@server ~]# ls
Desktop Downloads Music Public Videos
Documents tofile.sql Pictures Templates workspace
By running the following code, only the .log file will be listed by implementing FilenameFilter.
The vital method for this code is public boolean accept used to Filter all files inside a directory.
import java.io.File;
import java.io.FilenameFilter;
public class FileNameFilterExample{
/**
* @param FilenameFilter example
*/
public static void main(String[] args) {
File c = new File ("C:\\");
FileNameFilterExample mainClass = new FileNameFilterExample();
FileNameFilterExample.FileNameFiltering filter = mainClass.new FileNameFiltering();
String [] fileNames = c.list(filter);
for(String fileName : fileNames) {
System.out.println(fileName);
}
}
public class FileNameFiltering implements FilenameFilter {
@Override
public boolean accept(File dir, String name) {
// listing only .log files
return name.endsWith(".log");
}
}
}
Sample output of the code;
a – Copy (2).log
a – Copy (3).log
a – Copy (4).log
a – Copy (5).log
a – Copy.log
a.log
If you want to connect MySQL database on linux apply the following commands;
[root@server~]# mysql -h localhost -u root -pPassword
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is —
Server version: — MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql>use yourDataBaseName;
Database changed
mysql> truncate table anyTables;
You can use the following commands if you want to start,stop or restart MySQL Services on Linux;
[root@server ~]# /etc/init.d/mysqld restart
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]
[root@server ~]# /etc/init.d/mysqld stop
Stopping mysqld: [ OK ]
[root@server ~]# /etc/init.d/mysqld start
Starting mysqld: [ OK ]
If you get the exception mentioned below while using Flexigrid in your project
SCRIPT5007: Unable to get value of the property ‘display’: object is
null or undefined
flexigrid.js, line 692 character 5
Try to use Microsoft IE Developer tools first and my problem was related to removing the last coma in colModel
colModel :{display: ‘Row ID’, name : ‘id’, width : 100, sortable : false, align: ‘left’, hide: true},
{display: ”, name : ”, width : 100, sortable : true, align: ‘left’},
{display: ”, name : ”, width : 100, sortable : true, align: ‘left’},
{display: ”, name : ”, width : 150, sortable : true, align: ‘left’},
{display: ”, name : ”, width : 150, sortable : false, align: ‘left’},
{display: ”, name : ”, width : 150, sortable : true, align: ‘left’},
},
For the exception mentioned below;
Exception in thread “main” java.lang.NoClassDefFoundError: com/jhlabs/image/UnsharpFilter
at com.mortennobel.imagescaling.AdvancedResizeOp.filter(AdvancedResizeOp.java:84)
at ImageService.scaleImage(ImageService.java:21)
at ImageService.main(ImageService.java:31)
Caused by: java.lang.ClassNotFoundException: com.jhlabs.image.UnsharpFilter
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
… 3 more
You need to download Filters.jar (Java Image Processing Filters) from the following link;
You can call a top level JavaScript function inside an iframe with the following line;
window.parent.functionName();