Apps Script - UrlFetch Post Get Method To Postman-Echo



10 AngularJS Google Maps Demos & Examples

From: https://www.angularjs4u.com/modules/5-angularjs-google-maps-demos/
.

1. Angular Directives for Google Maps

AngularJS directives to integrate Google Maps into your applications.
AngularJS directives to integrate Google Maps into your applications. There are directives for most of the widely-used objects, including markers, windows, lines and shapes. We’re currently working on integrating more layer objects, including the HeatMap and such.

2. GM Simple Maps

AngularGM is a set of directives for embedding Google Maps in your application using the Google Maps Javascript API.
AngularGM is a set of directives for embedding Google Maps in your application using the Javascript API. If you want a handle to the map, you should use the getMapPromise(mapId) method so you can guarantee the map will be initialized.

3. Angular TODO Google Map Demo

Making google maps components with AngularJS. Awesome Demo.
Making map components with AngularJS pretty awesome demo. The simplest situation is just setting up a map with a starting location. Using the directive link function instantiate the map seems to do a great job.

4. Example of Angular Maps with Markers

A simple jsfiddle example of embedding a google map with markers.
A simple jsfiddle example of embedding a google map class with markers to calculate long and lat positions.

5. Playing with Maps using AngularJS

The talk covers basic Maps API following by the use of AngularJS to create a Maps application. The source code for live demo can be found under the "demo" directory in the github repository.
The talk covers basic Maps API following by the use of AngularJS to create a Maps application. The source code for live ng-map demo can be found under the “demo” directory in the github repository.

6-10 – Please tell us below if you know any more good JavaScript demos of Google maps which we can add to this web page to help others.
Also if you are looking to code or have coded any features we are looking for include functionality for zooming the maps with mouse scrolling or by finger pinch (on mobile devices) we would love to hear about it.  We’re also API integration such as real-time search custom markers and other similar geo-location features. In return we can offer you some exposure and usage/adoption to your module for free.
.

EPUBReader a lightweight HTML5 based ebook reader.

.
Welcome at EPUBReaders Homepage
The new free EPUBReader extension for Chrome is now available!
EPUBReader is a lightweight (< 1 MB) HTML5 based ebook reader.
✓ Reads ebooks in the EPUB format without DRM
✓ Opens the ebooks in memory at the location where they are stored, no extra space is required
✓ Uses the proven reading engine of the Firefox add-on EPUBReader (> 400,000 daily users)
✓ Works offline
✓ Is available in 24 languages
.

How To Make a Free 3D Cover Image of Your Book.

.

How To Make a Free 3D Cover Image of Your Book.

How To Make a Free 3D Cover Image of Your Book.

Looking to create a great-looking 3D cover image to help promote your latest book? Save yourself the time and money of having to hire someone to create this 3D cover image by spending just a few minutes and watching our latest YouTube tutorial that will walk you through the process step-by-step.


Why would you want a 3D image of your Book?

  1. As part of an attractive author email signature.
     
  2. As part of posts on your social media platforms like Facebook, Twitter and Google +.
     
  3. Helps to make great-looking book-banners.
     
  4. As marketing images directly on your author-website

Here is what you need


3D Book Template example  +     Pixlr image editor    +    GIMP image editor

Part 1 - Download your favorite 3D Book template image

No prior software experience is needed to create the 3D image, this easy-to-understand online tutorial will walk you through each step of the process.
Firstly pick the 3D template that most suites your book-type:

 

Option 1 

Standard large book template
3D Book Template example

Option 2

The spiral-bound book 3D template (Added June 29th 2016).
Spiral bound 3D Book Template 2

Option 3

The thin book 3D template (Added September 22nd 2016).
Thin Book 3D Template

Option 4

The hard-cover book 3D template (Added June 2nd, 2017).
White Hard Cover 3D Template


Part 2 - Access Pixlr: The free platform to create the simple 3D Book Image

This tutorial does not rely on Adobe Photoshop at all. Instead we will show you how to use the free online image editor found here; pixlr.com/editor/ to create the basic 3D image.
  

Part 3 - (Optional) Remove the background of the 3D book cover image using GIMP

I then use the free image-editing software called GIMP to touch up the image. (Download GIMP Here.)Please note, this step is entirely optional and will just polish the 3D cover-image further by removing the background "space".



 YouTube not your thing?

Here is our step-by-step instructions on how to create your own 3D Cover image.


Step 1 

First: Download your preferred 3D book image template file.
  1. Option 1: Standard 3D template.
  2. Option 2: Spiral-bound 3D template. 
  3. Option 3: Thin 3D book template.
  4. Option 4: Hard-cover 3D template.

Step 2

 (You will need to have the high-resolution image file of your Book cover ready.)
First: Open up the template image in Pixlr (Select the "Open image from Computer" option)

create 3D book image 1

Second: SelectLayer - Open image as layer.
Then browse your PC and find, select and open the rectangular book cover image.

Third: Select: Edit - Free Distort.
Drag the corners of the book cover image to match the four corners of the 3D book template. When prompted if you want to save the update, click yes.

Fourth: Select:  File - Save
Save the image to your computer as a PNG file with an appropriate name For example: 3D-Book-Image-MyBookName.png

Hint: You might want to adjust the 3D image dimensions before saving the file, this is done through the following menu: Select the "Image" menu and then select "Image Size".

create 3D book image 2


Congrats - You now have a professional-looking 3D image of your book cover!


3D Book Image MyBookName

I have deliberately left out the steps to tweak the image through GIMP. If you are more of a geek, please view the YouTube video demonstrating how to remove the background of the 3D image at the beginning of the article.

If you find this tutorial useful, please let me know, I would love to hear your feedback.
.
source: http://www.myebook.co.za/how-to-make-a-free-3d-cover-image-of-your-book

requestFileSystem() vs resolveLocalFileSystemURL()


.

When you get file system access using requestFileSystem, access is granted for the sandboxed file system only (the sandbox limits access to the app itself), not for general access to any file system location on the device. (read here for TEMPORARY and here for PERSISTENT storage tutorial)

To access file system locations outside the sandboxed storage, use other methods such as window.requestLocalFileSystemURL, which support platform-specific locations. 

As of Cordova v1.2.0 (cordova-plugin-file), URLs to important file-system directories are provided. Each URL is in the form file:///path/to/spot/, and can be converted to a DirectoryEntry using window.resolveLocalFileSystemURL(). (read here)
.

Methods

requestFileSystem()

Requests a file system where data should be stored. You access a sandboxed file system by requesting a LocalFileSystem object using this global method, window.requestFileSystem().
void requestFileSystem(
  in unsigned short type, 
  in unsigned long long size, 
  in FileSystemCallback successCallback, 
  in ErrorCallback errorCallback
);
Parameters
type
The storage type of the file system. The values can be either TEMPORARY or PERSISTENT.
size
The storage space—in bytes—that you need for your app.
successCallback
The success callback that is called when the browser provides a file system. Its argument is the FileSystem object with two properties:
  • name - the unique name assigned by the browser to the file system.
  • root - the read-only DirectoryEntry object representing the root of the file system.
opt_errorCallback
The error callback that is called when errors happen or when the request to obtain the file system is denied. Its argument is the FileError object.
Returns
void
Exceptions
This method can raise an FileError with the following code:
ExceptionDescription
SECURITY_ERRORThe application does not have permission to access the file system interface. For example, you cannot run from file://. For more details, see the article on basic concepts.

resolveLocalFileSystemURL()

Lets you look up the entry for a file or directory with a local URL.
void resolveLocalFileSystemURL(
  in DOMString url, 
  in EntryCallback successCallback, 
  in optional ErrorCallback errorCallback
);
Parameters
url
The URL of a local file in the file system.
successCallback
The success callback that is called when the browser provides the file or directory for the supplied URL.
errorCallback
The error callback that is called when errors happen or when the request to obtain the entry object is denied.
Returns
void
Exceptions
This method can raise an FileError with the following code:
ExceptionDescription
ENCODING_ERRThe syntax of the URL was invalid.
NOT_FOUND_ERRThe URL was structurally correct, but refers to a resource that does not exist.
SECURITY_ERRThe application does not have permission to access the file system interface.

.
REFERENCE:
1. https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html
2. https://developer.mozilla.org/en-US/docs/Web/API/LocalFileSystem
.

Ionic 1 Cordova Files (persistent)


Objective

1. To use window.requestFileSystem
2. To use window.PERSISTENT type of storage
3. To implement file create, read, write and delete.

References


0. Add Cordova

cordova plugin add cordova-plugin-file


1. HTML View

<button ng-click="cdv('create-file')" class="button button-positive button-block">create-file</button>

<button ng-click="cdv('write-file')" class="button button-positive button-block">write-file</button>

<button ng-click="cdv('read-file')" class="button button-positive button-block">read-file</button>

<button ng-click="cdv('remove-file')" class="button button-positive button-block">remove-file</button>

2. JS Controller

// The following is the constructor function for this page's controller. See https://docs.angularjs.org/guide/controller
// You can include any angular dependencies as parameters for this function
// TIP: Access Route Parameters for your page via $stateParams.parameterName
function ($scope, $stateParams,$ionicPlatform) {

$scope.cdvTasks = function (options) {
    console.log('cdvTasks begin');
   $ionicPlatform.ready(function() {
    console.log('deviceReady');
    /*cordova task begin*/
    switch (options) {
        case "create-file":
            window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, successCallback1, errorCallback1)

            function successCallback1(fs) {
                fs.root.getFile('log.txt', {
                    create: true,
                    exclusive: true
                }, function(fileEntry) {
                    alert('File creation successfull!')
                }, errorCallback1);
            }

            function errorCallback1(error) {
                alert("ERROR: " + error.code)
            }
            break;
        case "write-file":
            window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, successCallback2, errorCallback2)

            function successCallback2(fs) {
                fs.root.getFile('log.txt', {
                    create: true
                }, function(fileEntry) {

                    fileEntry.createWriter(function(fileWriter) {
                        fileWriter.onwriteend = function(e) {
                            alert('Write completed.');
                        };

                        fileWriter.onerror = function(e) {
                            alert('Write failed: ' + e.toString());
                        };

                        var blob = new Blob(['Lorem Ipsum'], {
                            type: 'text/plain'
                        });
                        fileWriter.write(blob);
                    }, errorCallback2);
                }, errorCallback2);
            }

            function errorCallback2(error) {
                alert("ERROR: " + error.code)
            }

            break;
        case "read-file":
            window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, successCallback3, errorCallback3)

            function successCallback3(fs) {
                fs.root.getFile('log.txt', {}, function(fileEntry) {

                    fileEntry.file(function(file) {
                        var reader = new FileReader();

                        reader.onloadend = function(e) {
                         
                            alert(this.result);
                        };
                        reader.readAsText(file);
                    }, errorCallback3);
                }, errorCallback3);
            }

            function errorCallback3(error) {
                alert("ERROR: " + error.code)
            }

            break;
        case "remove-file":
            window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, successCallback4, errorCallback4)

            function successCallback4(fs) {
                fs.root.getFile('log.txt', {
                    create: false
                }, function(fileEntry) {

                    fileEntry.remove(function() {
                        alert('File removed.');
                    }, errorCallback4);
                }, errorCallback4);
            }

            function errorCallback4(error) {
                alert("ERROR: " + error.code)
            }


            break;
    } /*switch*/
    function cdvFail(error) {
        alert("ERROR: " + error.code)
    }       
        /*cordova task end*/
});/*device ready*/
}/*app task*/ 

}

Ionic 1 Cordova Files (temporary)


Objective

1. To use window.requestFileSystem
2. To use window.TEMPORARY type of storage
3. To implement file create, read, write and delete.

References

0. Add Cordova

cordova plugin add cordova-plugin-file


1. HTML View

<button ng-click="cdv('create-file')" class="button button-positive button-block">create-file</button>

<button ng-click="cdv('write-file')" class="button button-positive button-block">write-file</button>

<button ng-click="cdv('read-file')" class="button button-positive button-block">read-file</button>

<button ng-click="cdv('remove-file')" class="button button-positive button-block">remove-file</button>

2. JS Controller


function ($scope, $stateParams,$ionicPlatform) {

$scope.cdv = function (options) {
    console.log('cordova plugins');
   $ionicPlatform.ready(function() { 
    console.log('deviceReady');
    /*cordova task begin*/
    switch (options) {
        case "create-file":
            var type1 = window.TEMPORARY;
            var size1 = 5 * 1024 * 1024;
            window.requestFileSystem(type1, size1, successCallback1, errorCallback1)

            function successCallback1(fs) {
                fs.root.getFile('log.txt', {
                    create: true,
                    exclusive: true
                }, function(fileEntry) {
                    alert('File creation successfull!')
                }, errorCallback1);
            }

            function errorCallback1(error) {
                alert("ERROR: " + error.code)
            }
            break;
        case "write-file":
            var type2 = window.TEMPORARY;
            var size2 = 5 * 1024 * 1024;
            window.requestFileSystem(type2, size2, successCallback2, errorCallback2)

            function successCallback2(fs) {
                fs.root.getFile('log.txt', {
                    create: true
                }, function(fileEntry) {

                    fileEntry.createWriter(function(fileWriter) {
                        fileWriter.onwriteend = function(e) {
                            alert('Write completed.');
                        };

                        fileWriter.onerror = function(e) {
                            alert('Write failed: ' + e.toString());
                        };

                        var blob = new Blob(['Lorem Ipsum'], {
                            type: 'text/plain'
                        });
                        fileWriter.write(blob);
                    }, errorCallback2);
                }, errorCallback2);
            }

            function errorCallback2(error) {
                alert("ERROR: " + error.code)
            }

            break;
        case "read-file":
            var type3 = window.TEMPORARY;
            var size3 = 5 * 1024 * 1024;
            window.requestFileSystem(type3, size3, successCallback3, errorCallback3)

            function successCallback3(fs) {
                fs.root.getFile('log.txt', {}, function(fileEntry) {

                    fileEntry.file(function(file) {
                        var reader = new FileReader();

                        reader.onloadend = function(e) {
                            
                            alert(this.result);
                        };
                        reader.readAsText(file);
                    }, errorCallback3);
                }, errorCallback3);
            }

            function errorCallback3(error) {
                alert("ERROR: " + error.code)
            }

            break;
        case "remove-file":

            var type = window.TEMPORARY;
            var size = 5 * 1024 * 1024;
            window.requestFileSystem(type, size, successCallback4, errorCallback4)

            function successCallback4(fs) {
                fs.root.getFile('log.txt', {
                    create: false
                }, function(fileEntry) {

                    fileEntry.remove(function() {
                        alert('File removed.');
                    }, errorCallback4);
                }, errorCallback4);
            }

            function errorCallback4(error) {
                alert("ERROR: " + error.code)
            }


            break;
    } /*switch*/
    function cdvFail(error) {
        alert("ERROR: " + error.code)
    }         
        /*cordova task end*/
});/*device ready*/
}/*app task*/    

}


NOTE:

List of Error Codes and Meanings

When an error is thrown, one of the following codes will be used.

CodeConstant
1NOT_FOUND_ERR
2SECURITY_ERR
3ABORT_ERR
4NOT_READABLE_ERR
5ENCODING_ERR
6NO_MODIFICATION_ALLOWED_ERR
7INVALID_STATE_ERR
8SYNTAX_ERR
9INVALID_MODIFICATION_ERR
10QUOTA_EXCEEDED_ERR
11TYPE_MISMATCH_ERR
12PATH_EXISTS_ERR