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
(function(undefined) { | |
// Get angular app | |
var app = angular.module("App"); | |
app.factory("XLSXReaderService", ['$q', '$rootScope', | |
function($q, $rootScope) { | |
var service = function(data) { | |
angular.extend(this, data); | |
}; |
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
Option Explicit | |
Private Type PersonQuery | |
firstName As String | |
lastName As String | |
fullName As String | |
firstNames As Range | |
lastNames As Range | |
fullNames As Range | |
namesSwapped As Boolean |
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
class Beanutils{ | |
//merge two bean by discovering differences | |
private <M> void merge(M target, M destination) throws Exception { | |
BeanInfo beanInfo = Introspector.getBeanInfo(target.getClass()); | |
// Iterate over all the attributes | |
for (PropertyDescriptor descriptor : beanInfo.getPropertyDescriptors()) { | |
// Only copy writable attributes | |
if (descriptor.getWriteMethod() != null) { |
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
var sip = require('sip'); | |
var sys = require('sys'); | |
var redis = require('redis'); | |
//Trim leading and trailing whitespace from string values. | |
function trim(str) { | |
return str.replace(/^\s+|\s+$/g, ''); | |
} | |
sip.start({},function(request) { |