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.firstscope.asynchronous; | |
import javax.ejb.Schedule; | |
import javax.ejb.Singleton; | |
import javax.ejb.Startup; | |
/** | |
* @author: hardik | |
* @since: 26.10.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
{ | |
"id":1, | |
"name": | |
"Company 1", | |
"slaTime":60, | |
"slaPercentage":0.9, | |
"currentSlaPercent":0.95 | |
} | |
{ |
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
import scala.util.matching.Regex | |
object HelloWorld { | |
def main(args: Array[String]) { | |
val pattern = new Regex("Id=(.*)") | |
val str = "http://www.xyz.com?Id=798" | |
val res = pattern.findAllMatchIn(str) | |
res.foreach { m => |
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
@PostConstruct | |
public void registerInJMX() { | |
try { | |
objectName = new ObjectName("Scope1:type=" + this.getClass().getName()); | |
platformMBeanServer = ManagementFactory.getPlatformMBeanServer(); | |
platformMBeanServer.registerMBean(sc.getBusinessObject(HealthMonitor.class), objectName); | |
} catch (IllegalStateException | InstanceAlreadyExistsException | MBeanRegistrationException | MalformedObjectNameException | NotCompliantMBeanException e) { | |
throw new IllegalStateException("Problem during registration of Monitoring into JMX:" + e); | |
} | |
} |
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
<h:outputLabel for="pwd1" value="Password 1: *" /> | |
<p:password id="pwd1" value="#{passwordBean.password6}" feedback="false" match="pwd2" label="Password 1" required="true"/> | |
<h:outputLabel for="pwd2" value="Password 2: *" /> | |
<p:password id="pwd2" value="#{passwordBean.password6}" feedback="false" label="Password 2" required="true"/> |
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
[alias] | |
ci = commit | |
br = branch | |
co = checkout | |
st = status | |
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all | |
lg = !"git lg1" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.firstscope</groupId> | |
<artifactId>scopeone</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<description>First scopeapplication</description> | |
<packaging>war</packaging> |
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
# open ~/.bashrc in your favorite editor (gedit, sublime, vim etc) | |
# add following to the file | |
# eclipse | |
export PATH=${PATH}:${HOME}/apps/eclipse |
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
cd ~/apps | |
tar xvf ~/Downloads/eclipse-jee-luna-SR2-linux-gtk-x86_64.tar.gz |
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
# open ~/.bashrc in your favorite editor (gedit, sublime, vim etc) | |
# add following to the file | |
# maven | |
export M2_HOME=${HOME}/apps/maven | |
export PATH=${PATH}:${M2_HOME}/bin |