Skip to content

Instantly share code, notes, and snippets.

View He-Pin's full-sized avatar
🎈
Playing Xenoblade 3

He-Pin(kerr) He-Pin

🎈
Playing Xenoblade 3
View GitHub Profile
package com.pekall.cd.mdm.web.adminweb.rpc.builder;
import com.fasterxml.jackson.databind.JsonNode;
import com.ning.http.client.*;
import com.ning.http.multipart.FilePart;
import com.pekall.cd.mdm.web.adminweb.rpc.PageSplit;
import com.pekall.cd.mdm.web.adminweb.rpc.http.constant.MDMWebConstants;
import com.pekall.cd.mdm.web.adminweb.rpc.http.constant.MDMWebQueryKey;
import play.Logger;
@He-Pin
He-Pin / BaseService.java
Created November 21, 2013 07:51
sequence call
protected static class Pair<A, B> {
public A a;
public B b;
public Pair() {
}
public Pair(A a, B b) {
this.a = a;
this.b = b;
@He-Pin
He-Pin / device detail
Created September 10, 2013 05:34
json with "/"
{"result":"0","records":9,"devices":[{"language":null,"id":288,"type":50702,"policy":null,"password":null,"status":50001,"roles":1,"fullName":"admin","email":"pekall@pekall.com","firstName":"","lastName":null,"username":"admin","enterpriseId":1,"userId":1,"os":51201,"updateTime":1378709412000,"phoneNumber":null,"deviceUuid":"sdsdsdsdsddswdsdsdsss","iosUdid":"sdsdsdsdsddswdsdsdsss","lastCheckin":1378709412000,"deviceDetail":null,"createTime":null,"securityInfo":null,"labelNames":null,"appList":null,"connect":0,"policyName":"lccTestPolicy","settingName":"默认Android设置","deviceLabels":null,"policySpecial":0,"settingSpecial":0,"appSetting":null},{"language":null,"id":285,"type":50701,"policy":null,"password":null,"status":50001,"roles":1,"fullName":null,"email":null,"firstName":null,"lastName":null,"username":"huawei","enterpriseId":1,"userId":307,"os":51201,"updateTime":1378550603000,"phoneNumber":null,"deviceUuid":"000311e2a21b78c400000140f7fc70b6","iosUdid":"000311e2a21b78c400000140f7fc70b6","lastCheckin":137855
@He-Pin
He-Pin / DeviceService.java
Created September 8, 2013 17:13
play wow
//for user service
public static Result listUserDeviceWS(){
return handleGET(new DefaultGETHandler("userName")
.queryHandler(new DefaultGETHandler.QueryHandler() {
@Override
public Result handle(final String queryValue) {
final Promise<Result> resultPromise =
rpcUserDeviceList(queryValue)
.map(new F.Function<MDMDeviceListResponse, Result>() {
@Override
package com.pekall.cd.mdm.web.admin.rpc.builder;
import com.ning.http.client.Request;
import com.ning.http.client.RequestBuilder;
/**
* Author: kerr
* Mail: pin.he@pekall.com
*/
public abstract class AbstractBuilder implements Builder {
package us.sosia.media.video;
import java.awt.image.BufferedImage;
public class ImageUtils {
/**
* @param args
*/
public static void main(String[] args) {
package us.sosia.media.video;
import java.awt.image.BufferedImage;
import java.nio.ByteBuffer;
import us.sosia.net.udt.codec.AbstractChainO2OEncode;
import com.xuggle.xuggler.ICodec;
import com.xuggle.xuggler.IPacket;
import com.xuggle.xuggler.IPixelFormat.Type;
package us.sosia.media.video;
import java.awt.image.BufferedImage;
import java.nio.ByteBuffer;
import us.sosia.media.video.channel.VideoClientChannel.VideoStreamListener;
import us.sosia.utils.logger.Logger;
import com.xuggle.ferry.IBuffer;
import com.xuggle.xuggler.ICodec;
/*****************************************************************************
Copyright (c) 2001 - 2011, The Board of Trustees of the University of Illinois.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above
copyright notice, this list of conditions and the