This file contains hidden or 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
select <seq_name>.nextval from dual; |
This file contains hidden or 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"?> | |
<configuration> | |
<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<pattern>%d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{36}.%M\(%line\) - %msg%n</pattern> | |
</encoder> | |
</appender> | |
<appender name="logger" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
This file contains hidden or 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
git init - [initializes project as a git managed project] | |
git ls-file - [list all tracked files] | |
git add . - [adds everything in project to git staging area] | |
git commit -am "Comment" - [adds and commits all changed files to staging area] | |
git pull origin master - [updates local branch with changes from repository] | |
git push origin master - [push local changes to repository] | |
git branch - [lists all local branches] | |
git checkout -b branchName - [switch to branch, -b creates the branch] | |
git merge my-new-branch - [merges my-new-branch into current branch] | |
git branch -d my-new-branch - [delete branch] |
This file contains hidden or 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
http://www.stefanalexandru.com/java/spring-4-jms-connection-with-java-config-and-weblogic-as-jms-provider |
This file contains hidden or 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
JAXBContext jaxbContext = JAXBContext.newInstance(<theObject>.class); | |
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); | |
StringReader reader = new StringReader(<thingToMarshall>); | |
<theObject> root = (<theObject>) unmarshaller.unmarshal(reader); |
This file contains hidden or 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
Add these lines to ~/.bashrc file | |
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
NO_COLOR="\[\033[0m\]" |
This file contains hidden or 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.permgen; | |
import java.util.Arrays; | |
public class PermgenBubbleSortAsce { | |
public static void main(String[] args) { | |
int arrayList[] = { 5,3,9,7,1,8 }; | |
System.out.println("\nFinal result:"+Arrays.toString(PermgenBubbleSortAsceMethod(arrayList))); |
This file contains hidden or 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
grep -no 'name="[^ ]*"' file.html > results.txt | |
In this line: | |
The n option will print the lines that matched the pattern. Simply for informative reasons, at first glance. Remove if you don't want it. | |
The o option prints only the matched text, not the entire line itself. | |
file.html is the path to your file. | |
the P option is for look arounds. | |
Also if you want the results saved to a file, you can pipe them by appending > results.txt: |
This file contains hidden or 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
final ClassToMock spy = Mockito.mock(ClassToMock.class); | |
Mockito.doNothing().when(spy).voidMethodToMock(...); |