Archive for the ‘Uncategorized’ Category
DDD Without any ORM tool, is it possible !!
DDD Without any ORM tool, is it possible !!
Look at the thread http://tech.groups.yahoo.com/group/domaindrivendesign/message/16021
If you have done DDD without any ORM, your comments are valuable.
Please write your views.
Javascript CSV parser
var expr = /,(?=(?:[^\"]*\”[^\"]*\”)*(?![^\"]*\”))/g;
var array = str.split(expr);
it works for me
function parseLineCSV(lineCSV) {
// parse csv line by line into array
var CSV = new Array();
// Insert space before character ",". This is to anticipate 'split' in IE
// try this:
//
// var a=",,,a,,b,,c,,,,d";
// a=a.split(/\,/g);
// document.write(a.length);
//
// You will see unexpected result!
//
lineCSV = lineCSV.replace(/,/g," ,");
lineCSV = lineCSV.split(/,/g);
// This is continuing of 'split' issue in IE
// remove all trailing space in each field
for (var i=0;i
<lineCSV.length;i++) {
lineCSV[i] = lineCSV[i].replace(/\s*$/g,"");
}
lineCSV[lineCSV.length-1]=lineCSV[lineCSV.length-1].replace(/^\s*|\s*$/g,"");
var fstart = -1;
for (var i=0;i=0) {
for (var j=fstart+1;j<=i;j++) {
lineCSV[fstart]=lineCSV[fstart]+","+lineCSV[j];
lineCSV[j]="-DELETED-";
}
fstart=-1;
}
}
fstart = (lineCSV[i].match(/^"/)) ? i : fstart;
}
var j=0;
for (var i=0;i
<lineCSV.length;i++) {
if (lineCSV[i]!="-DELETED-") {
CSV[j] = lineCSV[i];
CSV[j] = CSV[j].replace(/^\s*|\s*$/g,""); // remove leading & trailing space
CSV[j] = CSV[j].replace(/^"|"$/g,""); // remove " on the beginning and end
CSV[j] = CSV[j].replace(/""/g,'"'); // replace "" with "
j++;
}
}
return CSV;
}
It works for me, I got it from here http://purbayubudi.wordpress.com/2008/11/09/csv-parser-using-javascript/
Could not perform XSLT transformation. Make sure PHP has been compiled/configured to support XSLT.
Error when running symfony on wamp server.
Description: I was trying to run the symfony PHP framework. I tried to build the model using command
php symfony propel:build-model.
And it gave error Could not perform XSLT transformation. Make sure PHP has been compiled/configured to support XSLT.
Environment: Wamp server 2.0, PHP 5.2.5, Apache 2.2.6.
Reason: PHP-XSL extension is not enabled. By default, Wamp server doesnt enable php-xsl php extension. and php-xsl is required.
Solution: Enable php-xsl extension.
left click on WAMP’s tray icon and than in PHP>PHP extensions select php-xsl and enable it.But there is one more php.ini file, which WAMP won’t change, we need to do it by hand, open: C:\wamp\bin\php\php5.2.5\php.ini and remove “;” from the line
;extension=php_xsl.dll
And then restart the server. Try to run the build command again.
Some useful links to get symfony running properly on wamp.
http://trac.symfony-project.org/wiki/SymfonyOnWAMP
http://anandshahil11.wordpress.com/symfony-php-framwework-installation-on-windows-wamp/
What this blog is about?
You may be wondering what this blog is about !!.
This blog is about the errors, problems, configuration issues that I faced when doing my job of a Java programmer.
Here I write about the problems which casued me to open the google and seach atleast for an hour, ask questions on forums, post questions in mailing lists, or take whatever the alternatives are to solve the problem. When the problem is solved finally, I write the solution here so that it can save the time of others.