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 bill.boottest; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.boot.CommandLineRunner; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.cloud.aws.messaging.listener.annotation.SqsListener; | |
import com.fasterxml.jackson.annotation.JsonCreator; |
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 () { | |
if (!mstrmojo.plugins.D3BoxPlot) { | |
mstrmojo.plugins.D3BoxPlot = {}; | |
} | |
mstrmojo.requiresCls( | |
"mstrmojo.CustomVisBase", | |
"mstrmojo.models.template.DataInterface" | |
); |
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
// first version | |
var fizzBuzzN = n => { | |
if (n % 15 == 0) return "FizzBuzz"; | |
if (n % 3 == 0) return "Fizz"; | |
if (n % 5 == 0) return "Buzz"; | |
return n; | |
} | |
// second version -- single divisibility test, no repeat of 3 and 5 cases | |
// 3 and 5 |
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
#MICROSTRATEGY_BEGIN | |
# | |
#DESC This script takes a metric from MSTR as a vector, and passes it to qicharts. Then returns the LCL, CL or UCL as | |
# a metric for use in MSTR. | |
#DESC Revision A | |
# | |
#RVAR Metric -input -numeric -vector -repeat | |
# | |
#RVAR Chart -parameter StringParam8 | |
# |
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
wordWrap :: String -> Int -> String | |
wordWrap "" _ = "" | |
wordWrap str limit = | |
let | |
helper [] result curLineLen = result | |
helper (curWord:remainder) result curLineLen | |
| ((length curWord) + curLineLen >= limit) = helper remainder (result ++ "\n" ++ curWord) (length curWord) | |
| otherwise = helper remainder (result ++ " " ++ curWord) (curLineLen + 1 + length curWord) | |
wordList = words str |
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 sql = require('node-sqlserver-unofficial'); | |
var Promise = require('promise'); | |
var connectStr = "Driver={SQL Server Native Client 11.0};Server=localhost;Database=AdventureWorksDW2012;Trusted_Connection=yes"; | |
var testData = [ | |
{id: 1, foo: 'asdf'}, | |
{id: 2, foo: 'zxcv'}, | |
{id: 3, foo: 'qwer'}, | |
{id: 4, foo: 'skdjflgsljd'} |