This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hprog99; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class TestPasswordValidator { | |
private static Pattern passPattern = | |
Pattern.compile("((?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%_*]).{6,20})"); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hprog99; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class ExtractStrTag { | |
private static Pattern tagPattern = | |
Pattern.compile("<imageTag>(.+?)</imageTag>"); //here replace <imageTag> with your required tag | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html ng-app="tagApp"> | |
<head> | |
<style> | |
.friendTag { | |
display: inline-block; | |
margin-right: 5px; | |
font-size: 13px; | |
background-color: dodgerblue; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tagApp = angular.module('tagApp',['ui.autocomplete']); | |
tagApp.controller('tagController',function($scope,EventService){ | |
$scope.tags = []; | |
$scope.addTag = function () { | |
if ($scope.modelObj != "" && $scope.tags.indexOf($scope.modelObj) == -1) { | |
$scope.tags.push($scope.modelObj); | |
} | |
$scope.modelObj = ""; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:sort select="normalize-space(substring(itpc:StartDate,1,4))" order="descending"/> | |
<xsl:sort select="normalize-space(substring(itpc:StartDate,6,2))" order="descending"/> | |
<xsl:sort select="normalize-space(substring(itpc:StartDate,9,2))" order="descending"/> | |
<!--Suppose date is in format: 2015-11-15T12:22:15--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "angular2-quickstart", | |
"version": "1.0.0", | |
"scripts": { | |
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ", | |
"lite": "lite-server", | |
"postinstall": "typings install", | |
"tsc": "tsc", | |
"tsc:w": "tsc -w", | |
"typings": "typings" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Lets assume value.questionUniqueId is coming from json response | |
var dataModel = $parse('data_' + value.questionUniqueId); | |
var dataModel1 = $parse(value.questionUniqueId + '_data'); | |
var labelsModel = $parse('labels_' + value.questionUniqueId); | |
var seriesModel = $parse('series_' + value.questionUniqueId); | |
dataModel.assign($scope, ['1', '2', '3', '4', '5']); | |
dataModel1.assign($scope, ['1', '2', '3', '4', '5']); | |
labelsModel.assign($scope, [ | |
[3, 0, 1, 4, 6] | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rm /usr/local/mysql | |
sudo rm -rf /usr/local/mysql* | |
sudo rm -rf /Library/StartupItems/MySQLCOM | |
sudo rm -rf /Library/PreferencePanes/My* | |
rm -rf ~/Library/PreferencePanes/My* | |
sudo rm -rf /Library/Receipts/mysql* | |
sudo rm -rf /Library/Receipts/MySQL* | |
sudo rm -rf /private/var/db/receipts/*mysql* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
AZURE_STORAGE_CONNECTION_STRING="" | |
FOLDER_NAME="data_"$(date +'%d-%m-%Y-%H-%M-%S') | |
MYSQL_USER_NAME="root" | |
MYSQL_USER_PASSWORD="" | |
MYSQL_DB_NAME_ARRAY=() | |
MONGO_DB_NAME_ARRAY=() | |
FOLDER_BACKUP_ARRAY=() | |
AZURE_STORAGE_CONTAINER_NAME="" | |
AZURE_BLOB_NAME="full_backup_"$(date +'%d-%m-%Y')".zip" |