Skip to main content

Posts

View all drives in mac lion

Do you also feel the need to see all the files and folders that your mac has it is very easy and simple to do   Press ALT + TAB and select finder you should see this at the top selection menu  Then Click on Finder and then on Preferences You will see a menu like this  Now all you need to do is just check all the Hard Disk and External Drive boxes and you are done. Let me know if you have any more issues I'll be more than happy to help.

Refresh a page using jQuery

The easiest way to refresh a page is: to use "location.reload();" Example: $( document ).ready( function () { $( '#template_add' ).click( function (){ var textarea = $( '#textarea' ).val(); var tag = $( '#template_tag' ).val(); $.ajax({   url: '/templates/addtemplate' ,   type: "POST" ,   data: {text: textarea,temp_tag: tag},   success: function ( data ) {   location.reload();   } }); }); }); It is very easy process, let me know if you have any issues.

command to view stash in git

Hello,    today I learned about how to view the stash that you have on ur local system using terminal, I use github to store my repo and work on it, the command to do it is git stash show -p stash@{0} where you can replace 0 with the stack number. Happy forking! :)

get rid of remove You have new mail in /var/mail/username on a Mac

open a terminal and use mail at the prompt, then d to delete one message or d1-4 for for four messages. Then q to quit Hope it helped, I also want to give the credit of this answer to  dmckee ,  whitequark  for sharing the correct answer in  http://superuser.com/questions/149282/safely-get-rid-of-you-have-new-mail-in-var-mail-on-a-mac

Adding Regex validations in Zend Framework

Hello Friends,       The code to add a validation in zend framework is: given below is the regex for alphanumeric chater! $alpha = new Zend_Validate_Regex( '/^[a-zA-Z0-9]+[0-9]+[a-zA-Z0-9]*$/i' ); $alpha->setMessage( 'Password must be alphanumeric' ); $userPassword->addValidator($alpha); if the regex is not correct nothing will get displayed!

T_ENCAPSED_AND_WHITESPACE

PHP Parse error:  syntax error, unexpected T_ENCAPSED_AND_WHITESPACE! Tired of this error, the solution is: the value which you are trying to get from $_POST or from web browser to server are getting in using single quotes and you are trying to access them using double quotes or vice versa! example On Jquery client side: $('#submit_transaction').live('click',function(){ $.ajax({ url: '../abcd/addTransactionview.php', type: "POST", data:{ created : $('date').val(), amount : $('amount').val(), merchant : $('merchant').val(), authToken : $.cookie("authToken") }, success: function(data) { $('#preview').html(''); $('#preview').html(data); } }); }); On Server side: $authToken = $_POST("authToken"); $created = $_POST('created'); $amount = $_POST('amount'); $merchant = $_POST('merchant');