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
val filteredMap = sort.filterKeys(path => | |
!parsePath(entityName, path).attribute.isVirtual) |
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
public class RestHandler extends RequestHandler | |
{ | |
@Override | |
public void processRequest(IMxRuntimeRequest request, IMxRuntimeResponse response, String path) throws Exception | |
{ | |
Core.getLogger("RestHandler").info("Received request for path '" + path + "', resourcepath '" + request.getResourcePath() + "'."); | |
String[] pathParts = request.getResourcePath().split("/"); | |
String queryName = pathParts[pathParts.length-1]; |
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
// BEGIN USER CODE | |
Core.addRequestHandler("hello/", new HelloWorldRequestHandler()); | |
Core.getLogger("RequestHandlers").info("Registered Hello World requesthandler for 'hello/'"); | |
return true; | |
// END USER CODE |
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
public class HelloWorldRequestHandler extends RequestHandler { | |
@Override | |
public void processRequest(IMxRuntimeRequest request, IMxRuntimeResponse response, String path) throws Exception | |
{ | |
String greeting = "Hello world!"; | |
OutputStream outputStream = response.getOutputStream(); | |
IOUtils.write(greeting, outputStream); | |
IOUtils.closeQuietly(outputStream); | |
} |
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
from sys import stdin | |
from math import ceil, sqrt | |
def rline(): | |
return stdin.readline().rstrip() | |
def sign(p): | |
if p < 0: | |
return -1 | |
elif p > 0: | |
return 1 | |
else: |
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
from sys import stdin | |
def rline(): | |
return stdin.readline().rstrip() | |
for l in range(int(rline())): | |
(n,m) = map(int, rline().split()) | |
total = 0 | |
length = len(str(n)) | |
for k in range(n, m+1): | |
s1 = str(k) |
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
def rline(): | |
return stdin.readline().rstrip() | |
for i in range(int(rline())): | |
data = map(int, rline().split()) | |
googlers = data[0] | |
surprising = data[1] | |
p = data[2] | |
scores = data[3:] | |
num = 0 |
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
english = "zq our language is impossible to understand there are twenty six factorial possibilities so it is okay if you want to just give up" | |
googlerese = "qz ejp mysljylc kd kxveddknmc re jsicpdrysi rbcpc ypc rtcsra dkh wyfrepkym veddknkmkrkcd de kr kd eoya kw aej tysr re ujdr lkgc jv" | |
mapping = dict(zip(googlerese, english)) | |
lines = map(lambda x: x.strip(), stdin.readlines()) | |
for i in range(1, len(lines)): | |
print "Case #%s: %s" % (i, "".join([mapping[char] for char in lines[i]])) |
NewerOlder