- https://frontendmasters.com/
- https://www.class-central.com
- http://www.udacity.com
- http://www.freecodeamp.com
- https://codecademy.com
- https://mva.microsoft.com/
- https://github.com/open-source-society/computer-science
- https://www.khanacademy.org
- https://www.safaribooksonline.com/ ( One Month Free Trial )
- http://edx.org
- http://coursera.org
- http://udemy.com
- https://www.skillshare.com/
- https://thenewboston.com/videos.php
- https://angularfirebase.com/
- http://w3schools.com
- https://www.airpair.com/
- https://egghead.io
- http://tutsplus.com
- https://www.pluralsight.com/browse/software-development ( 10 Days Free Trial )
- https://hackr.io
- https://academy.fossbytes.com/
- https://www.codeschool.com
- http://www.learnvern.com/
- http://www.lynda.com (10 Days Free Trial)
- https://www.datacamp.com
- https://alison.com/
- http://programming-motherfucker.com/become.html
- https://itpro.tv/PAID
- https://www.cbtnuggets.com
- https://linuxacademy.comAWS (Amazon Web Services)
- https://www.youtube.com/watch?v=BDBvHOaaKHo&list=PLv2a_5pNAko0Mijc6mnv04xeOut443Wnk
- https://linuxacademy.com/ (AWS and other cloud solutions )
- https://coursehunters.net/
- https://scrimba.com/
Category: Cordova
How to lock screen orientation to portrait or landscape?
This article will show you how to lock screen orientation to one direction.
Environment Details:
– Phonegap Build – cli-5.2.0
– Device: iPhone S5 9.3.2
For locking orientation to portrait add following code into your config.xml:
<gap:config-file platform="ios" parent="UISupportedInterfaceOrientations" overwrite="true"> <array> <string>UIInterfaceOrientationPortraitOmg</string> </array> </gap:config-file>
For Landscape:
<gap:config-file platform="ios" parent="UISupportedInterfaceOrientations" overwrite="true"> <array> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> </gap:config-file>
Source: https://github.com/phonegap/build/issues/263
Android: How to generate key hash for Android Facebook?
In order to generate key hash you need to follow some easy steps.
1) Download Openssl from: here.
2) Make a openssl folder in C drive
3) Extract Zip files into this openssl folder created in C Drive.
4) Copy the File debug.keystore from .android folder in my case (C:\Users\SYSTEM.android) and paste into JDK bin Folder in my case (C:\Program Files\Java\jdk1.6.0_05\bin)
5) Open command prompt and give the path of JDK Bin folder in my case (C:\Program Files\Java\jdk1.6.0_05\bin).
6) Copy the following code and hit enter
keytool -exportcert -alias androiddebugkey -keystore debug.keystore > c:\openssl\bin\debug.txt
7) Now you need to enter password, Password = android.
8) If you see in openssl Bin folder, you will get a file with the name of debug.txt
9) Now either you can restart command prompt or work with existing command prompt
10) get back to C drive and give the path of openssl Bin folder
11) copy the following code and paste
openssl sha1 -binary debug.txt > debug_sha.txt
12) you will get debug_sha.txt in openssl bin folder
13) Again copy following code and paste
openssl base64 -in debug_sha.txt > debug_base64.txt
14) you will get debug_base64.txt in openssl bin folder
15) open debug_base64.txt file Here is your Key hash.
Source: StackOverflow
Cordova: How to download file and get download progress?
var assetURL = 'http://www.anywebsite.com/test.mp3'; var store = cordova.file.externalRootDirectory; // output in android: file:///storage/emulated/0/ // or // var store = "cdvfile://localhost/persistent/"; var fileName = 'Sounds/test.mp3'; // NOTE: Sounds folder should already be there in order to download file in that folder var fileTransfer = new FileTransfer(); fileTransfer.download(assetURL, store + fileName, function(entry) { console.log("Success!"); //appStart(); }, function(err) { console.log("Error"); console.dir(err); }); fileTransfer.onprogress = function(result){ var percent = result.loaded / result.total * 100; percent = Math.round(percent); console.log('Downloaded: ' + percent + '%'); };
Cordova: How to check if a file exists or not?
document.addEventListener("deviceready", init, false); //The directory to store data var store; //File name of our important data file we didn't ship with the app var fileName = "testfile.txt"; function init() { console.log("Checking for data file."); // output in android: file:///storage/emulated/0/ store = cordova.file.externalRootDirectory; // or // store = "cdvfile://localhost/persistent/"; //Check for the file. window.resolveLocalFileSystemURL(store + fileName, onSuccess, onFail); } function onSuccess() { console.log("Great! This file exists"); } function onFail() { console.log('Sorry! File not Found'); }
Above code works for both files and directories.
For Full article with extended features visit Following:
Cordova Sample: Check for a file and download if it isn’t there
Click here for Complete Documentation of cordova.file plugin
Cordova: How to create directory?
/* ############ # Method 1 # ############ */ // output in android: file:///storage/emulated/0/ var base_url = cordova.file.externalRootDirectory; // or // var base_url = "cdvfile://localhost/persistent/"; var new_directory = 'TEST'; // To Create a sub Directory inside a folder // var new_directory = 'Sounds/Test'; // Here 'Sounds' is the name of existing parent directory. Parent Directoy must exist to work fine window.resolveLocalFileSystemURL(base_url, function (fileSystem) { dir.getDirectory(new_directory, { create: true }, function (file) { alert("got the file: "+ file.name + ', ' + file.fullPath); }); }); /* ############ # Method 2 # ############ */ var new_directory = 'TEST'; window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem) { fileSystem.root.getDirectory(new_directory, { create: true }, function (file) { alert("got the file: "+ file.name + ', ' + file.fullPath); }); }, function(error) { alert("can't even get the file system: " + error.code); });
For Documentation Visit: https://www.npmjs.com/package/cordova-plugin-file#android-file-system-layout