ionic change android class name

You have to follow following steps:

1. Change in AndroidMnifest.xml

<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="SoftwareCostEstimation" android:theme="@android:style/Theme.Black.NoTitleBar" android:windowSoftInputMode="adjustResize">

2. Change in build.xml

<project name="SoftwareCostEstimation" default="help">

3. Change the name of file and class name

Change the CordovaApp.java to SoftwareCostEstimation.java

and don't forget to change the name of class like:

public class SoftwareCostEstimation extends CordovaActivity

Run ionic build android

Doing this your generated apk name will be changed according to project name.

ionic change application package name

Go to config.xml and change the value of id attribute like:

<widget id="com.bospp.softwarecostestimation" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
  <name>SoftwareCostEstimation</name>
  <description>
        An Software Cost Estimation App
    </description>
  <author email="rahul@bospp.com" href="http://bospp.com/">
      Rahul Jain
    </author>

...
...
...

</widget>

After changing values you have to run ionic build android command.

Also you can change other values like email, author etc.

Saml 2.0 certificate expiration date using java

Use below code to get expiration date of saml certificate

String certificate = "Your SAML 2.0 certificate here";
CertificateFactory fty = CertificateFactory.getInstance("X.509");
ByteArrayInputStream bais = new ByteArrayInputStream(Base64.decodeBase64(certificate.getBytes()));
X509Certificate idp_cert = (X509Certificate) fty.generateCertificate(bais);

System.out.println("Expiration date---"+ idp_cert.getNotAfter());

It would look like:

String certificate = "MIIDpDCCAoygAwIBAgIGAVFrmYh8MA0GCSqGSIb3DQEBBQUAMIGSMQswCQYDVQQGEwJVUzETMBEG"+
                    "A1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzENMAsGA1UECgwET2t0YTEU"+
                    "MBIGA1UECwwLU1NPUHJvdmlkZXIxEzARBgNVBAMMCmRldi04OTgwMzgxHDAaBgkqhkiG9w0BCQEW"+
                    "DWluZm9Ab2t0YS5jb20wHhcNMTUxMjA0MDYwNTQyWhcNMjUxMjA0MDYwNjQyWjCBkjELMAkGA1UE"+
                    "BhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDTALBgNV"+
                    "BAoMBE9rdGExFDASBgNVBAsMC1NTT1Byb3ZpZGVyMRMwEQYDVQQDDApkZXYtODk4MDM4MRwwGgYJ"+
                    "KoZIhvcNAQkBFg1pbmZvQG9rdGEuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA"+
                    "o79hx758z1uoUuV4C0wXlwKrSCzGhLvuNW/h5/1VB9svfFKs7zZ3b+dLoP3DptiL8CtNxQbH7nMS"+
                    "hwQHkoHMUlVI9X/I2FAptQcMNh4bmbNBh+L6/3fopxG4AEdt/25rjDu8lgfG/9kpGuJ4OJLH3cJZ"+
                    "MgToKUBz5+T85O4fBs5moANJyRFlvg3xwW6oQ7ufTTEM/t80zc/MpPMTfHqaiU+MHjaTeTT3FZdB"+
                    "cutp+HHjMND9EnR7hC6bzO1aDSGHxw+z3gbIbu1vSAUakB4qU6rStTOgmYPx8rAZh8dFTrLv2aKL"+
                    "SxLBHylhB9Fou8QknlKWT1p753eQikcKQiM/6wIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQA2IiqR"+
                    "FM1Odhzj86F56dXZ1DXYZXRDl77nqcbghbzkuMm7+LShC6zGSORVh4APpYKGKOK3Y/DN78/kixfH"+
                    "XUWNuCdk5vpGdBgOf2ipVIeY+BuqFJpNeWL4Udldcp7cOTVpZW/mmZZSMyxppeJ7qolS2LLdwo0U"+
                    "Vn7l6QgNkA7q2MFGcSjw/GfTks+aEozj5vkMo33ESt5MEY0xixAtCql4p0j56U7MtRKkwczl3Ou4"+
                    "rbS4NtPiqLZ3/DQAaGgNgQo9z7kHvOlpbwbwBX3dCrFWEfkHUBf6ccTeVOvRt39IGGzcNcAxyV63"+
                    "Yzfcw6H3SFnOUNINHcpEMCkK1viGiaeV";


        CertificateFactory fty = CertificateFactory.getInstance("X.509");
        ByteArrayInputStream bais = new    ByteArrayInputStream(Base64.decodeBase64(certificate.getBytes()));
        X509Certificate idp_cert = (X509Certificate) fty.generateCertificate(bais);
        System.out.println(idp_cert.getNotAfter());

angularjs infinite scroll

Include dependency js file in index.html
   - <script type="text/javascript" src="lib/ng-infinite-scroll.min.js"></script>

Inject module in app.js
   - angular.module('myapp', [ 'ngResource', 'infinite-scroll' ]);

Html code:
 <div class="container pad0">
        <div class="scrollpagebox">
            <div infinite-scroll-disabled="isBusy" infinite-scroll="infiniteScroll()" infinite-scroll-distance="1" style="overflow: auto;">
                   <div class="col-md-6 col-sm-8 col-sm-offset-2 col-md-offset-0" data-ng-repeat="job in jobsList">
                    <div class="old-event event">
                        <div class="content">
                            <h1 class="name">
                                {{job.name}} (#{{job.id}})
                            </h1>
                            <p class="schedule blue">
                                {{job.type}}
                            </p>
                            <p class="schedule blue">
                                {{job.companyName}}
                            </p>
                        </div>
                     </div>
                </div>
            </div>
        </div>
</div>

In Controller:
$scope.isBusy = false;
$scope.limit = 5;
$scope.offset = 0;
$scope.jobsList = [];

$scope.getJobsList = function(){
     $scope.isBusy = true;
     JobService.list({start: $scope.offset, rows: $scope.limit}, function (jobs){
                $scope.jobsList.push.apply($scope.jobsList, jobs);
                $scope.jobsSize = $scope.jobsList.length;
                if (jobs.length > 0) {
                    $scope.isBusy = false;
                    $scope.offset += $scope.limit;
                }else{
                    $scope.isBusy = true;
                }
    });
}

$scope.infiniteScroll = function(){
     $scope.getJobsList();
}

The thing is how you manage your isBusy variable.

URL regex with or without www

var urlRegex = /(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;

use it in your code like:

if(!urlRegex.test(targetUrl)){
        isTargetUrlValid = false;
}else{
        isTargetUrlValid = true;
}