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
# Course Project | |
# Coursera Getting and Cleaning Data | |
# Johns Hopkins University | |
# Author: Ben McKibben | |
# 2015-04-24 | |
# https://github.com/bmckibben/Tidy_Data_Project/blob/master/run_analysis.R | |
# Requirements | |
# | |
# 1. Merges the training and the test sets to create one data set. | |
# 2. Extracts only the measurements on the mean and standard deviation for each measurement. |
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
@RequestMapping(method = RequestMethod.GET, value = {"/meters"}) | |
public ResponseEntity<Object> getMetersInfo( | |
@RequestParam(value = "containerId", required = true) | |
String meterInfoContainerId, | |
@RequestParam(value = "resourceType", required = true)String resourceType, | |
@RequestParam(value = "key", required = true)String key, | |
@RequestParam(value = "value", required = true)String name, | |
@RequestParam(value = "type" , required = true)String type) { | |
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
// 1. Structure declaration | |
// 2. Enum declartion | |
// 3. Structure variables declaration | |
struct HTTPRequest { | |
enum Method { | |
case GET | |
case POST | |
} | |
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 com.prodapt.m2m.rest.domain; | |
public class PIPError { | |
private String type; | |
private String message; | |
private String ruleId; | |
private String contentInstanceId; | |
private String content; |
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
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); | |
kbuilder.add(ResourceFactory.newFileResource("/home/shankar/Public/licenseApplication.drl"), ResourceType.DRL); | |
if( kbuilder.hasErrors() ) { | |
System.err.println(kbuilder.getErrors().toString()); | |
} | |
org.kie.internal.KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); |
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 com.tribe21.domain; | |
import java.io.IOException; | |
import javax.xml.bind.JAXBContext; | |
import javax.xml.bind.JAXBException; | |
import javax.xml.bind.SchemaOutputResolver; | |
public class Application { | |
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
Map vars = new HashMap(); | |
vars.put("foobar", new Integer(120)); | |
Boolean result = (Boolean) MVEL.eval("foobar > 99", vars); | |
if (result.booleanValue()) { | |
System.out.println("Hurrah"); | |
} | |
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 KarplusStrong: | |
def ks_loop(self, x, alpha, D): | |
import numpy as np | |
if D < 1: | |
print('Duration D must be greater than 1') | |
if x.ndim != 1: | |
print('The array entered is of the wrong size') | |
return None |
NewerOlder