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
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.util.Objects; |
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
class CreditCardValidatorTest extends Specification{ | |
def "Testing CreditCardValidator.isValid() method "(){ | |
given: "CreditCardValidator instance" | |
CreditCardValidator cardValidator=new CreditCardValidator() | |
when: "Invoke isValid($cardNumber) method" |
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
Header Metadata | |
// Header Metadata | |
var hm = require('header-metadata') ; | |
//setting metadata | |
hm.current.set('Authentication','Bearer kjeklkdslfkdsfld'); | |
var allHeaders=hm.current.headers; | |
console.info(allHeaders); | |
// changing response header | |
hm.response.set('Content-Type','application/xml'); | |
console.info('Response Headers :'+ JSON.stringify(hm.response.headers)); |
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
var urlopen = require('urlopen'); | |
var hm = require('header-metadata') ; | |
var all_current = hm.current.headers ; | |
var ibmUser = hm.current.get("Ibm-App-User") ; | |
console.log(ibmUser); | |
console.log('session.parameters :'+session.parameters); | |
var my_content = hm.current.get("Content-type") ; | |
var options = { | |
target: 'http://backend.service.com', | |
method: 'POST', |
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"?> | |
<jnlp spec="1.0+" | |
codebase="http://localhost:8080/jnlp/" href="launch.jnlp"> | |
<information> | |
<title>JNLP Launcher</title> | |
<vendor>ThirupathiReddy Vajjala.</vendor> | |
<homepage href="index.html"/> | |
<description> Simple JNLP APplication through server !</description> | |
<offline-allowed/> | |
</information> |
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 Shortcuts | |
alias gs='git status' | |
alias gst='git status -sb' | |
alias ga='git add' | |
alias gau='git add -u' # Removes deleted files | |
alias gp='git pull' | |
alias gpu='git push' | |
alias gc='git commit -v' | |
alias gca='git commit -v -a' # Does both add and commit in same command, add -m 'blah' for comment | |
alias gco='git checkout' |
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
Skip to content | |
Safari Home | |
Recommended | |
Queue | |
History | |
Topics | |
Tutorials | |
Offers & Deals |
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
/** Reference to logger */ | |
private static final Logger LOGGER = LoggerFactory.getLogger(ApiDocumentationConfig.class); | |
@Autowired | |
private MessageSource msgSource; | |
@Bean | |
public Docket apiDocumentation() { | |
return new Docket(DocumentationType.SWAGGER_2).groupName("api").apiInfo(apiInfo()).select().paths(PathSelectors.any()).build() | |
.securitySchemes(newArrayList(securitySchema())).securityContexts(newArrayList(securityContext())); | |
} |
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
#Spring social customizatin flow | |
http://docs.spring.io/autorepo/docs/spring-social/1.1.0.RELEASE/reference/htmlsingle/ | |
border: 1px solid #ccc; | |
padding: 10px; | |
box-shadow: 3px 5px 5px 5px #ccc; |
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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:th="http://www.thymeleaf.org"> | |
<div class="container" th:fragment="content"> | |
<div class="row"> | |
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> | |
<h2>Invoking RESTful WebServices beyond the proxy</h2> |
NewerOlder