Yesterday I got a chance to write sample build.xml for one of my colleague. He has default build.xml for his project which is written by someone based on random directories (similar to war directory structure). This build.xml is used to pack the directory sturctures and place it into the tomcat server webapp directory. In this type scenario he did not able to debugging his application from eclipse.

I advised them to create one more build.xml based on eclipse directory structure for production or uat deployment. For development purpose try to setup a tomcat server and debugging your application in eclipse without worrying about deployment. I provided that sample build.xml below. Please look it and provide your comments.

<?xml version="1.0" encoding="UTF-8"?>
<project name = "tems" basedir = "." default = "war">
  
    <property name="project-name" value="${ant.project.name}" />
    <property name="builder" value="Achappan Mahalingam" />

    <property name="war-file-name" value="${project-name}.war" />
    <property name="source-directory" value="src" />
    <property name="classes-directory" value="build/classes" />
    <property name="web-directory" value="WebContent" />
    <property name="web-xml-file" value="WebContent/WEB-INF/web.xml" />
    <property name="libs-directory" value="WebContent/WEB-INF/lib" />
    <property name="build-directory" value="build" />


    <target name = "info">
          <echo message = ""/>
          <echo message = "${project-name} Build File"/>
          <echo message = "-----------------------------------"/>
          <echo message = "Run by ${builder}"/>
       </target>

    <target name="war" depends="info">
        <mkdir dir="${build-directory}" />
        <delete file="${build-directory}/${war-file-name}" />
        <war warfile="${build-directory}/${war-file-name}" webxml="${web-xml-file}">
            <classes dir="${classes-directory}" />
            <fileset dir="${web-directory}">
                <exclude name="WEB-INF/web.xml" />
            </fileset>
        </war>
    </target>
</project>
By using ob_start(), the page and headers aren't sent to the browser until they've loaded completely, or until we call ob_end_flush().
Wow! I got this error when i am creating a below table with FULLTEXT indices. The reason for this exception is "Full-Text Search is supported only with MyISAM Engine before MySQL version 5.6"

CREATE TABLE comment
(
    commentid int unsigned NOT NULL AUTO_INCREMENT,
    userid int unsigned NOT NULL,
    comment text NOT NULL,
    PRIMARY KEY (commentid),
    FULLTEXT KEY comment (comment)
) ;

Solution:

You specify MyISAM engine at end of the table creation.

CREATE TABLE comment
(
    commentid int unsigned NOT NULL AUTO_INCREMENT,
    userid int unsigned NOT NULL,
    comment text NOT NULL,
    PRIMARY KEY (commentid),
    FULLTEXT KEY comment (comment)
) ENGINE=MyISAM;



 
TLS is the new name for SSL. Namely, SSL protocol got to version 3.0; TLS 1.0 is "SSL 3.1". TLS versions currently defined include TLS 1.1 and 1.2. Each new version adds a few features and modifies some internal details. We sometimes say "SSL/TLS".

HTTPS is HTTP-within-SSL/TLS.

SSL (TLS) establishes a secured, bidirectional tunnel for arbitrary binary data between two hosts.

HTTP is a protocol for sending requests and receiving answers, each request and answer consisting of detailed headers and (possibly) some content. HTTP is meant to run over a bidirectional tunnel for arbitrary binary data; when that tunnel is an SSL/TLS connection, then the whole is called "HTTPS".
I tried to install  a GRUNT (which a javascript task runner to perform repetitive tasks like minification, compilation, unit testing, linting, etc...) but getting network proxy configuration settings error. So started googling to get a solution and found out the below steps to rectify this error.


C:\Users\amahalingam>npm config set proxy http://hostname:80

C:\Users\amahalingam>npm config set https-proxy http://hostname:80

C:\Users\amahalingam>npm install -g grunt-cli
C:\Users\amahalingam\AppData\Roaming\npm\grunt -> C:\Users\amahalingam\AppData\R
oaming\npm\node_modules\grunt-cli\bin\grunt
grunt-cli@0.1.13 C:\Users\amahalingam\AppData\Roaming\npm\node_modules\grunt-cli

├── resolve@0.3.1
├── nopt@1.0.10 (abbrev@1.0.5)
└── findup-sync@0.1.3 (lodash@2.4.2, glob@3.2.11)

Screenshots:

Error:














Solution:





I want to use javascript on my ongoing moodle development work. But the latest version of moodle 2.8 supporting to YUI library. Now there is no use of YUI because yahoo ceased that api due to transitioning (http://yahooeng.tumblr.com/post/96098168666/important-announcement-regarding-yui)
The soultion is that moodlers suggesting to install nodejs to use javascripts modules. So I mentioned steps which i installed on my windows 7 machine.

1. Download the latest nodejs executable file from https://nodejs.org/#download

















2. Once the installation done the files will be placed under the C://Program Files/nodesjs directory


3. Click on command prompt and test the nodejs verion to check the nodejs installed correctly.








4.  While doing nodejs installation it will also install npm.



5. To check the nodejs by script 
  Just write hello.js with the content console.log('Welcome to NodeJs!'); 
 Then from command prompt right the below command to execute it

 




6. Create a test file server.js and put this code in that file:
var http = require('http');
http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Hello World\n');
}).listen(1337, "127.0.0.1");
console.log('Server running at http://127.0.0.1:1337/');






7. Open this address in your browser: http://127.0.0.1:1337/

Blog Archive

Total Pageviews

Popular Posts