Skip to content

Instantly share code, notes, and snippets.

View wujiyu115's full-sized avatar
🎯
Focusing

farwmarth wujiyu115

🎯
Focusing
View GitHub Profile
package org.ddth.game;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
@wujiyu115
wujiyu115 / gist:python
Created May 14, 2012 08:31
gist:python
import sublime
import sublime_plugin
import os
import sys
import json
import base64
import urllib2
import subprocess
import functools
import webbrowser
@wujiyu115
wujiyu115 / c#:songlist
Created August 23, 2013 09:33
kugou song list to song list
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
@wujiyu115
wujiyu115 / android:gray
Created September 4, 2013 11:54
android:gray
ColorMatrix localColorMatrix = new ColorMatrix();
localColorMatrix.setSaturation(0.0F);
ColorMatrixColorFilter localColorMatrixColorFilter = new ColorMatrixColorFilter(localColorMatrix);
this.recordCardIcon.setColorFilter(localColorMatrixColorFilter);
@wujiyu115
wujiyu115 / android:text
Created September 12, 2013 07:22
android:text
Paint paint = new Paint();
paint.setColor(Color.WHITE);
paint.setTypeface(Typeface.DEFAULT_BOLD);
paint.setAntiAlias(true);
paint.setDither(true);
paint.setTextSize(20);
@wujiyu115
wujiyu115 / android:alias
Created September 23, 2013 13:08
android:alias
canvas.setDrawFilter(new PaintFlagsDrawFilter(0, Paint.ANTI_ALIAS_FLAG|Paint.FILTER_BITMAP_FLAG));
@wujiyu115
wujiyu115 / android:getModel
Created September 29, 2013 13:32
android:getModel
public static String getModle(){
String model =Build.MODEL;
int index = model.indexOf(" ");
if(index==-1)
return model.substring(0);
else
return model.substring(0,index);
}
@wujiyu115
wujiyu115 / lua:cocos2dxlua
Created January 8, 2014 10:50
lua:cocos2dxlua
function FormatSerialize(Object)
local function ConvSimpleType(v)
if type(v)=="string" then
return string.format("%q",v)
elseif type(v) =='number' or type(v) =='boolean' then
return tostring(v)
end
return string.format("%q",type(v))
end
@wujiyu115
wujiyu115 / lua:instance
Created February 11, 2014 11:57
lua:instance
Hello = {}
function Hello:new() --private method.
local store = nil
return function(self)
if store then return store end
print"create." --for test.
local o = {}
setmetatable(o, self)
self.__index = self
@wujiyu115
wujiyu115 / 0_reuse_code.js
Last active August 29, 2015 14:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console