Skip to content

Instantly share code, notes, and snippets.

:octocat:

K. Siva Prasad Reddy sivaprasadreddy

:octocat:
Block or report user

Report or block sivaprasadreddy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sivaprasadreddy
sivaprasadreddy / AuthenticationTokenInjectHandler.java
Created Apr 30, 2012
JAX-WS WSI Authentication using UserName & Password Security Headers
View AuthenticationTokenInjectHandler.java
import java.io.IOException;
import java.util.Set;
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPConstants;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPFactory;
import javax.xml.soap.SOAPHeader;
@sivaprasadreddy
sivaprasadreddy / gist:e1d0c34d418195a682d01a0dc63c2b6d
Created Feb 24, 2019 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup
View gist:e1d0c34d418195a682d01a0dc63c2b6d

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@sivaprasadreddy
sivaprasadreddy / angularjs-filters.html
Created Sep 15, 2014
AngularJS filters final HTML
View angularjs-filters.html
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>My AngularJS App</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
@sivaprasadreddy
sivaprasadreddy / HelloAngular-Application.java
Created Sep 4, 2014
Hello AngularJS Application.java
View HelloAngular-Application.java
package com.sivalabs.app;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Configuration
View hello-ang-webjars-basic.html
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>DashBoard</title>
<link rel="stylesheet" href="webjars/bootstrap/3.2.0/css/bootstrap.css"/>
<link rel="stylesheet" href="webjars/font-awesome/4.1.0/css/font-awesome.css"/>
<link rel="stylesheet" href="css/styles.css"/>
</head>
View RESTEasy+Spring-Web.xml
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<listener>
<listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
</listener>
View hello-angularjs.html
<html>
<head>
<title>Hello AngularJS</title>
<meta charset="UTF-8">
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
</head>
<body ng-app>
<p>Enter Name: <input type="text" ng-model="myname"> </p>
<p>Hello {{myname}}!!</p>
</body>
View CleanMoneyTransferService
class FundTransferTxn
{
private Account sourceAccount;
private Account targetAccount;
private BigDecimal amount;
private boolean allowDuplicateTxn;
//setters & getters
}
public class CleanMoneyTransferService
View UglyMoneyTransferService
public class UglyMoneyTransferService
{
public void transferFunds(Account source, Account target, BigDecimal amount, boolean allowDuplicateTxn) throws IllegalArgumentException, RuntimeException {
Connection conn = null;
try {
conn = DBUtils.getConnection();
PreparedStatement pstmt = conn.prepareStatement("Select * from accounts where acno = ?");
pstmt.setString(1, source.getAcno());
ResultSet rs = pstmt.executeQuery();
Account sourceAccount = null;
View RESTEasyDemo-Custom-ExceptionHandlers.java
/**
* ResourceNotFoundExceptionHandler.java
*/
package com.sivalabs.resteasydemo;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider;
import org.springframework.stereotype.Component;
You can’t perform that action at this time.