Tuesday, March 6, 2018

Dreamweaver fatal error XML parsing

Step 1: Close DW, Navigate to C:\User\uruser\AppData\Roaming\Adobe\Dreamweaver CS5\en_US\Configureation\Workspace\ and delete the specific xml file

Re-open DW. DW should auto-create your Workspace layout XML file again. See if it works fine.

PROCEED TO STEP 2 ONLY IF STEP 1 DOESN'T SOLVE THE ISSUE

Step 2: Navigate to C:\Users\useruser\AppData\Roaming\Adobe\Dreamweaver CS5\en-US\Configuration and delete the entire 'CONFIGURATION' folder. Re-open DW. DW should auto-create your configuration folder based on predefined layouts and config options. This will definitely fix your issue.

 Reason for this issue: This issue would have been caused due to a malformed workspace layout configuration. That may happen due to customizations you may have done to the layout/ improper file permissions/ improper shutdown on Windows.

NOTE: Reference link is https://forums.adobe.com/thread/996876

Sunday, March 4, 2018

Remove White space in Dreamweaver

Isn’t it insanely annoying some times when you open a CSS File or a HTML File only to find Dreamweaver has added loads of blank lines, if your CSS is more white space than code then running this script will be very helpful.
I’ve used a tonne of CSS Compressors to fix Dreamweavers fail of blank lines in the past, but most of them do not support CSS 3, and the ones that do – seemingly do not support the transition effect.  This however, works fine with PHP, HTML and CSS (self tested).  So no more tears for those added line breaks in your PHP or CSS, just run this fix!
Open the file in Adobe Dreamweaver, press CTRL+F to load the Find & Replace dialog box (or Edit > Find and Replace).
Do the search on the source code view.
Check the box “Use regular expression” and un-check any other boxes.
Find: [\r\n]{2,}
Replace: \n
The hit “replace all”
It may take a while so fit back and wait whilst your CSS / HTML or PHP Document is flushed of all those annoying line breaks!
NOTE:  This Article is taken from http://www.itsadam.co.uk/dreamweaver-fix-removing-extra-line-breaks-in-css-html-php/

Friday, March 2, 2018

Simple php function to get coordinates from address through google services

Here I am showing you how to get coordinates from address using google api (Thanks to Google). The result will solely depends on how google support it in the future. Because google will set the 1st index result for the most relevant, thus this works quite well in general.
Function in php:
function getCoordinates($address){
 
$address = str_replace(" ", "+", $address); // replace all the white space with "+" sign to match with google search pattern
 
 
$response = file_get_contents($url);
 
$json = json_decode($response,TRUE); //generate array object from the response from the web
 
return ($json['results'][0]['geometry']['location']['lat'].",".$json['results'][0]['geometry']['location']['lng']);
 
}


echo getCoordinates('740 Story Rd San Jose CA 95122');



Note*: This article is taken from https://colinyeoh.wordpress.com/2013/02/12/simple-php-function-to-get-coordinates-from-address-through-google-services/

How to get coordinates from address through google services

Here is the code

<!DOCTYPE html>
<html>
<body>
<div id="googleMap" style="width:100%;height:800px;"></div>

<script>
function myMap() {
var mapProp= {
    center:new google.maps.LatLng(51.508742,-0.120850),
    zoom:5,
};
var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);

google.maps.event.addListener(map, 'click', function(event) {
alert(event.latLng.lat() + ", " + event.latLng.lng());
});

}
</script>

<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyADIXqFBFbbBy3fs-IRL-LH1ozRN4QhgJM&callback=myMap"></script>
</body>
</html>

Tuesday, January 23, 2018

Laravel: Access denied for user 'homestead'@'localhost' (using password: YES)

If you have changed your database credentials in .env file as well in database.php file and you still face the problem then use  the below commands.

php artisan config:clear
php artisan cache:clear
php artisan config:cache

and if you face "Laravel 5 Class 'form' not found"
You can also try running the following commands in Terminal or Command:
1. composer dump-auto or composer dump-auto -o
2. php artisan cache:clear
3. php artisan config:clear

Tuesday, August 23, 2016

jquery-confirm! Plugin.

A jQuery plugin that provides great set of features like, Auto-close, Ajax-loading, Themes, Animations and more. 
URL: http://craftpip.github.io/jquery-confirm/

Note: This plugin link is taken from craftpip website. 

Thursday, February 18, 2016

How to turn your Windows 7/8/10 Laptop into a WiFi Hotspot

1 step:  netsh wlan show drivers

2 Step: netsh wlan set hostednetwork mode=allow ssid=jasim key=123456789

3 Step: netsh wlan start hostednetwork

4 Step: netsh wlan show hostednetwork

and for stoping use the below shell code

5: step: netsh wlan stop hostednetwork

How to change the PHP version for subfolders or subdomains

  How to change the PHP version for subfolders or subdomains Setting a specific PHP version for a specific websites, subfolders or subdomain...