20 Eylül 2013 Cuma

List of Foreign Keys in Mysql

Following sql shows list of foreing keys in Mysql. You may require this information for foreign key manipulations, such as dropping a foreign key.

use INFORMATION_SCHEMA;

select TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME,
REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME from KEY_COLUMN_USAGE where
TABLE_NAME = '<table>';

You may require this information for foreign key manipulations, such as dropping a foreign key.

Resource: http://stackoverflow.com/questions/201621/how-do-i-see-all-foreign-keys-to-a-table-or-column 

1 Eylül 2013 Pazar

My First Open Source Contribution

I have just completed my first open-source contribution to gwt-bootstrap project. The code updates are merged to master branch!

https://github.com/gwtbootstrap/gwt-bootstrap/pull/425

This is my first contribution to a widely used and known project. Previously, I had published several open-source projects which are not active now.

Learn JBoss Forge

Video: Forge New Ground in Rapid Enterprise Software Development
http://www.youtube.com/watch?v=Clso5vtKu9k

Learn GWT


Login Security
https://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ: Describe how to log in, store data in a secure fashion in the server, stay logged in, make auto complete feautre

Advanced:
Best Practices For Architecting Your GWT App
http://www.google.com/intl/tr/events/io/2009/sessions/GoogleWebToolkitBestPractices.html: Describes history handling, event bus, MVP architecture, unit testing of GWT applications

Learn Bootstrap

29 Ağustos 2013 Perşembe

gwt-bootstrap Lazy Developer's Guide


  1. Add following dependency into your pom.xml:
    <dependency>
        <groupId>com.github.gwtbootstrap</groupId>
        <artifactId>gwt-bootstrap</artifactId>
        <version>2.2.1.0</version>
        <scope>provided</scope>
    </dependency>
  2. Add following repository into your pom.xml
     <repository>
         <id>sonatype</id>
         <url>http://oss.sonatype.org/content/repositories/snapshots</url>
         <snapshots><enabled>true</enabled></snapshots>
         <releases><enabled>false</enabled></releases>
     </repository>

  3. Run following maven command to download dependencies:

    mvn process-resources

  4. Add following module dependency to your *.gwt.xml file.

    <inherits name="com.github.gwtbootstrap.Bootstrap" />

  5. Add following script inside your module start page's HEAD section

    <head>

    <!-- before your module(*.nocache.js) loading -->

    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!--[if IE 7]>
    <link rel="stylesheet" href="{your module name}/css/font-awesome-ie7.css">
    <![endif]-->


    <!-- your module(*.nocache.js) loading -->
    </head>

25 Ağustos 2013 Pazar

How to Bind Port 80 to Tomcat 7 in Ubuntu



Default tomcat installation uses 8080 port. This is not preferred way when you present your web application over a top-level domain. I needed this information for my new sites gamenism.com/game and onlineuml.net/modeler. Below I am describing how to bind port 80 to Tomcat 7.
  • Backup /var/lib/tomcat7/conf/server.xml
  • Open /var/lib/tomcat7/conf/server.xml for editing. Find the part beginning with "<Connector"
    As highlighted below, change the value of port attribute to 80.

    <Connector port="80" protocol="HTTP/1.1"    connectionTimeout="20000"   
        URIEncoding="UTF-8"
       
        redirectPort="8443" />
  • Backup /etc/default/tomcat7 file
  • Open /etc/default/tomcat7 file for editing. 
    • Find the line containing "AUTHBIND" property. This line should be commented. Uncomment it.
    • Set AUTHBIND property to YES. This is required to bind a port to a process which is less than 1023.

      AUTHBIND=yes
  • Restart tomcat 7

    sudo /etc/init.t/tomcat7 restart