Skip to content

Instantly share code, notes, and snippets.

View dileeph's full-sized avatar

Dileep Hareendran dileeph

View GitHub Profile
@dileeph
dileeph / angular-filters.html
Created June 9, 2017 18:08
angular-filters.html
<html>
<head>
<script src="angular-1.4.8.js"></script>
</head>
<body ng-app="myapp">
<div ng-controller="aController">
{{ aValue | date}} <br/>
{{bValue | uppercase}}
<br/>
@dileeph
dileeph / full-app-ng-view.htm
Created June 9, 2017 18:19
full-app-ng-view
===== index.html================
<html>
<head>
<script src="angular-1.4.8.js"></script>
<script src="angular-route-1.4.8.js"></script>
<script src="app1-main.js"></script>
<script src="app1-claim.js"></script>
</head>
<body>
@dileeph
dileeph / grunt-exampl-1.js
Created June 16, 2017 18:56
grunt example 1
====package.json==========
{
"name": "app1",
"version": "1.0.0",
"devDependencies": {
"grunt": "^1.0.1"
}
}
======Gruntfile.js===================
@dileeph
dileeph / grunt-sample1-code.html
Created June 16, 2017 19:09
grunt-sample1-code
==== app.js -=======
var app = angular.module("app",["module1", "module2"]);
=== module-1.js ================
var module1 = angular.module("module1",[]);
module1.controller("controllerOne",["$scope", function($scope){
$scope.name = "Matt";
}]);
@dileeph
dileeph / bower.json
Created June 16, 2017 19:29
bower json
{
"name": "app1",
"description": "",
"main": "",
"authors": [
"dileep"
],
"private": true,
"dependencies": {
"angular": "1.4.8"
@dileeph
dileeph / Gruntfile.js
Created June 16, 2017 19:34
grunt bower file
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
"bower-install-simple": {
options: {
color: true,
directory: "lib"
},
@Override
public void visit(ClassOrInterfaceDeclaration n, Struts2InputOutput io) {
// System.out.println("Name of class: " + n.getn.getName());
final StringBuilder fullClassName = new StringBuilder();
final List<ImportDeclaration> imports = new ArrayList<>();
n.getParentNode().ifPresent(parent -> {
((CompilationUnit) parent).getPackageDeclaration()
.ifPresent(packageName -> fullClassName.append(packageName.getNameAsString()));
imports.addAll(((CompilationUnit) parent).getImports());
});
import java.util.AbstractMap.SimpleEntry;
import java.util.Collections;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class TagPatterns {
public static Map<PatternKey, String> tagdirectiveURLPatternMap() {
@dileeph
dileeph / scriptlet
Last active January 22, 2018 11:27
final Pattern scriptletstartreg = Pattern.compile("<%[^-|@]");
final Pattern scriptletendreg = Pattern.compile("[^-]%>");
final List<Scriptlet> scripts = new ArrayList<>();
//--start else--//
//--current code --//
currentPageTldPrefix.keySet().forEach(key -> {
Pattern regexForEachTagPrefixPattern = Pattern.compile(key);
@dileeph
dileeph / QueryBuilder.java
Last active February 26, 2018 15:54
build query using java 8 features
package com.my.crawler;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Supplier;
public class QueryBuilder {
private Map<String, Object> parameterMap = new HashMap<>();