Saturday, 15 April 2017

OAuth2::Error usageLimits accessNotConfigured

OAuth2::Error
{"errors"=>[{"domain"=>"usageLimits", "reason"=>"accessNotConfigured", "message"=>"Access Not Configured. Please use Google Developers Console to activate the API for your project."}], "code"=>403, "message"=>"Access Not Configured. Please use Google Developers Console to activate the API for your project."}: { "error": { "errors": [ { "domain": "usageLimits", "reason": "accessNotConfigured", "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project." } ], "code": 403, "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project." } }


ANSWER

You must enable a couple API's for things to work as expected.
First go to https://console.developers.google.com and make sure under "APIs" that you have the "Contacts API" and "Google+ API" enabled. Once that is done you should no longer see that error message. =)

Tuesday, 11 April 2017

how to hide input type number arrows


HTML

<input type="number"  placeholder="Mobile Number" >


CSS

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button 
{ -webkit-appearance: none; -moz-appearance: none; appearance: none; margin: 0; }

ui slider price range in mobile not working


Just add the script after jQuery ui:

<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> 

<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>

 <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js"></script>

Saturday, 8 April 2017

Export MySQL data to Excel in PHP

public function actionExportpropertyexcel()
{
$Property = YOUR_SQL_QUERY

$filename = 'HEMANT - '.date('Y-m-d h:i:s').' - List.xls';
//header("Content-type: application/vnd-ms-excel");
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/vnd.ms-excel; charset=UTF-8");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment; filename=".$filename);

echo '<table width="100%" border="1">
<thead>
<tr>
<th>Property id</th>
<th>Property Type</th>
<th>Property Name</th>
<th>Address</th>
<th>Pincode</th>
<th>City</th>
<th>State</th>
<th>Country</th>
<th>Added By</th>
<th>Status</th>
<th>Created On</th>

</tr>
</thead>';
foreach($Property as $prop)
{
echo '
<tr>
<td>'.$prop->id.'</td>
<td>'.$prop->property_type.'</td>
<td>'.$prop->detail->property_name.'</td>
<td>'.$prop->locality.'</td>
<td>'.$prop->pincode.'</td>
<td>'.$prop->city.'</td>
<td>'.$prop->state.'</td>
<td>'.$prop->country.'</td>
<td>'.$prop->property_owner_detail->detail->name.'</td>
<td>'.$prop->status.'</td>
<td>'.$prop->created_at.'</td>
</tr>
';
}
echo '</table>';
}

Thursday, 6 April 2017

country state city mysql database / File

https://drive.google.com/file/d/0B0xTe-b-qqoEM2tDdmQ5OWFMbjg/view?usp=sharing 

Saturday, 1 April 2017

php send email html not send solution

<?php// Multiple recipients$to 'johny@example.com, sally@example.com'// note the comma

// Subject
$subject 'Birthday Reminders for August';
// Message$message '
<html>
<head>
  <title>Birthday Reminders for August</title>
</head>
<body>
  <p>Here are the birthdays upcoming in August!</p>
  <table>
    <tr>
      <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
    </tr>
    <tr>
      <td>Johny</td><td>10th</td><td>August</td><td>1970</td>
    </tr>
    <tr>
      <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
    </tr>
  </table>
</body>
</html>
'
;
// To send HTML mail, the Content-type header must be set$headers[] = 'MIME-Version: 1.0';$headers[] = 'Content-type: text/html; charset=iso-8859-1';
// Additional headers$headers[] = 'To: Mary <mary@example.com>, Kelly <kelly@example.com>';$headers[] = 'From: Birthday Reminder <birthday@example.com>';$headers[] = 'Cc: birthdayarchive@example.com';$headers[] = 'Bcc: birthdaycheck@example.com';
// Mail itmail($to$subject$messageimplode("\r\n"$headers));?>