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
public void getOneUserMention(String userId, long lastMsgTime, String nickname) { | |
if (sinaToken == null) { | |
LOG.info(userId + ", userMention get token null!"); | |
return; | |
} | |
if (!isOwnToken) { | |
LOG.info(userId + ", userMention no ownToken, exit!"); | |
return; | |
} | |
try { |
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 renderConfidants(dom){ | |
var data = JSON.parse(currentProfile.confidants); | |
if($.isEmptyObject(data)){ | |
return; | |
} | |
var formatData = {"nodes":[], "links":[]}; | |
formatData.nodes.push({ | |
"type" : 3, | |
"img_href" : 'http://tp2.sinaimg.cn/' + currentProfile.uid + '/50/0/0', | |
"width": 50, |
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
public InetAddress resolveInetAddress(String host, String defaultValue1, String defaultValue2) throws UnknownHostException, IOException { | |
if (host == null) { | |
host = defaultValue1; | |
} | |
if (host == null) { | |
host = defaultValue2; | |
} | |
if (host == null) { | |
for (CustomNameResolver customNameResolver : customNameResolvers) { | |
InetAddress inetAddress = customNameResolver.resolveDefault(); |
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
/** | |
* Returns the first non-loopback address on any interface on the current host. | |
* | |
* @param ip_version Constraint on IP version of address to be returned, 4 or 6 | |
*/ | |
public static InetAddress getFirstNonLoopbackAddress(StackType ip_version) throws SocketException { | |
InetAddress address = null; | |
Enumeration intfs = NetworkInterface.getNetworkInterfaces(); |
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.xxx.xxx; | |
import org.junit.Test; | |
import redis.clients.jedis.Jedis; | |
import java.util.*; | |
/** | |
* User: evanhuang | |
*/ |
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
/** This is a fairly well optimized object which alows | |
* access to binary files from JScript on a Windows | |
* operating system. | |
* | |
* A the end of the file is small set of tests to show how it | |
* is used. You will require ADODB 2.5 or higher installed. | |
* this will be so on most 2000 machines and all XP or higher | |
* machines. | |
* | |
* CopyRight: Dr Alexander J Turner - all rights reserved. |
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
scan 'test', {COLUMNS => ['F'],FILTER => "(SingleColumnValueFilter('F','u',=,'regexstring:http:.*pdf',true,true)) AND (SingleColumnValueFilter('F','s',=,'binary:2',true,true))"} |
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
//<script type="text/javascript" src="${resroot}/javascripts/lib/d3.v3.min.js"></script> | |
//<script type="text/javascript" src="${resroot}/javascripts/lib/d3.layout.cloud.js"></script> | |
/** | |
* EX: arr = [{"text":123,"size":12}] | |
* */ | |
var arr = []; | |
var fill = d3.scale.category20(); | |
d3.layout.cloud().size([700, 250]) | |
.words(arr) | |
.rotate(function() { return Math.ceil(Math.random()*40)-20; }) |