If you want to get the phpunit coverage report for a single class you can use --filter setting with the --coverageoption.phpunit --coverage-html ./report --filter InsuranceStatusEligibilityFilterTest PluginAllTests.php
Pass the frequency and current date to get an array of dates.eg.getDatesForYear(4,'2011-01-01');the array you get will have the following dates"2011-04-30","2011-08-31","2011-12-31"public function getDatesForYear($monthlyFequency,$date){$dateParts = explode("-",$date); $firstDayOfTheYear = $dateParts[0] . '-01-01'; $lastDayOfTheYear = $dateParts[0] . '-12-31'; $i = $firstDayOfTheYear;for(strtotime($i);strtotime($i)<=strtotime($lastDayOfTheYear);) { $accruDate[] = date('Y-m-d',strtotime($i . " +$monthlyFe
XAMPP 1.7.2 comes bundled with the appropriate Xdebug .dll file. You only have to configure php.ini to use it. Note that all Xdebug settings have text explaining them.Locate and open XAMPP_HOME\php\php.ini for editing. This is the only php.ini file in XAMPP 1.7.2.Find and uncomment the line zend_extension = "XAMPP_HOME\php\ext\php_xdebug.dll".Find and uncomment the line xdebug.remote_host=localhost. Change the value of the setting ...
Install Apache Open Terminal (Application -> Accessories -> Terminal) and execute the following command:sudo apt-get install apache2check if the Apache is working properly by pointing your browser to http://localhost. If you see the text “It works!”, it means Apache is working.Issue the following command to resolve following error “Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 ...
Install PEAR . Issue the command sudo apt-get install php-pear.Make sure PEAR is up to date. Issue the command sudo pear channel-update pear.php.net. Upgrade the PEAR elements. Issue the command sudo pear upgrade-all.Tell PEAR where to find the PHPUnit code. Issue the command sudo pear channel-discover pear.phpunit.deInstall PHPUnit. Issue the command sudo pear install -a phpunit/PHPUnit. The -a makes sure ...
I have seen many php scripts trying to create CSV's using strings and adding commas inside a for loop. But this method is prone to errors since it doesn't work properly with special characters like comma and quotation. This function use php fputcsv to create a CSV file in the server memory rather than the disk making its faster to ...
If you want to get the open a folder in terminal by just right clicking on a folder run this command as the super user. sudo apt-get install nautilus-open-terminal
form#frmBilling label:not(.formRadio){ width: 140px;}The above width will be applied to all the labels in the form exceptlabels with the class formRadio.
If you want to get the changed file list >svn diff -r REVNO:HEAD --summarizeexample>svn diff -r 6738:6739 --summarizeGet as a patch file >svn diff -r 6738:6739>mychange.diffapply the patch file>patch -p0 -i mychange.diff
Go to the command line as root or admin userExport the databasemysql -u UserName -p password databaseName > dbdump.sqlImport the databasemysql -u UserName -p password databaseName < dbdump.sql
This command works fine in ubuntu ,login as the root and type the following command to enable mode_rewrite. sudo gedit /etc/apache2/sites-available/defaultIn the following section change AllowOverride None to AllowOverride All. Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all # Uncomment this directive is you want to see apache2's # default start page (in /apache2-default) when you go ...
function isValidDate(txtDate) { var objDate; // date object initialized from the txtDate string var mSeconds; // milliseconds from txtDate // date length should be 10 characters - no more, no less if (txtDate.length != 10) return false; // extract day, month and year from the txtDate string // expected format is YYYY-mm-DD // subtraction will cast variables to integer implicitly ...
Its very easy to download files in symfony. Create a proper action and do something like this , i have assumes that files are stored in the database and its a pdf file. But you can assign any file by storing the file type in the database.public function executeDownloadFile(sfWebRequest $request) { $yourfileData = '' // get your file data from ...
Are getting error when you save a doctrine object saying primary key violation?Before you save the object you must search if its already there. When you use find it uses the primary key.public function saveFamilyDetails($form) {$employeeFamilyDetails = Doctrine::getTable('EmployeeFamilyDetails')->find($form['txtFamilyID']); if(!($employeeFamilyDetails instanceof EmployeeFamilyDetails) ) { $employeeFamilyDetails = new EmployeeFamilyDetails(); } $employeeFamilyDetails->employee_id = $form['txtEmpID']; $