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
- cluster | |
{ | |
"name": "new team from clusteradmin", | |
"desc": "", | |
"perms": { | |
}, | |
"business-objects": { | |
"cluster": ["development"] |
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 Solution { | |
public int compareVersion(String version1, String version2){ | |
String[] parts1; | |
String[] parts2; | |
if(version1.contains(".")){ | |
parts1 = version1.split("\\."); | |
}else{ | |
parts1 = new String[]{version1}; | |
} | |
if(version2.contains(".")){ |
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
var arr11 = [1,2,7,10,20,1000,3,14] | |
var arr22 = [2,7,110,200,10100,13,14,9]; | |
var arr1 = arr11.concat(arr22); | |
for(var i=1; i < arr1.length; i++){ | |
var cVal = arr1[i]; | |
var j=i; |
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
@Around("execution(* org.tssg.millicore.model.widg.ProjectDaoImpl.listWithApps(..))") | |
public List<Project> aroundProjectListWithApps(ProceedingJoinPoint pjp) throws Throwable{ | |
Object[] args=pjp.getArgs(); | |
String name = pjp.getSignature().getName(); | |
System.out.println("starting timing around " + name); | |
UserContext u = null; | |
for(Object a : args){ | |
if(a instanceof UserContext){ | |
u = (UserContext)a; | |
Explain.startTimer(u.getExplain(), name); |
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
# Memory Settings | |
JAVA_OPTS="$JAVA_OPTS -Xms100m -Xmx2048m -XX:MaxPermSize=256m" | |
# Define some MilliCore parameters | |
JAVA_OPTS="$JAVA_OPTS -Dfeedhenry.node=node01 -Dfh.cluster.config=/etc/feedhenry/core/cluster-config.properties -Dfh.logdir=/var/log/feedhenry" | |
# JDWP debugging | |
JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9000,suspend=n" |
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
childproc.exec("dig fh-aaa-mongodb.default.cluster.local A +short", function (err, stdout, stderr) { | |
if (stderr) { | |
console.log("error with getting replicas", stderr); | |
} else { | |
var ips = stdout.split("\n"); | |
var cleanIps = []; | |
for (var i = 0; i < ips.length; i++) { | |
if (ips[i] && "" !== ips[i]) { | |
cleanIps[i] = ips[i].trim(); |
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
function remoteMathService(cb){ | |
var one; | |
var two; | |
callOneService(function (err,num){ | |
one = num; | |
}); | |
callTwoService(function (err, num){ | |
two = num; | |
}); |
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
process.env.FH_MESSAGING_REALTIME_ENABLED = true | |
var mbaasApi = require('fh-mbaas-api'); | |
var express = require('express'); | |
var mbaasExpress = mbaasApi.mbaasExpress(); | |
var cors = require('cors'); | |
// list the endpoints which you want to make securable here | |
var securableEndpoints; | |
// fhlint-begin: securable-endpoints | |
securableEndpoints = ['/hello']; |
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
package main | |
import ( | |
"io/ioutil" | |
"os" | |
"fmt" | |
"regexp" | |
) | |
func CountFloors()(int,error){ |
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
install package control | |
https://github.com/ironcladlou/GoTools |
OlderNewer