Skip to content

Instantly share code, notes, and snippets.

View windwp's full-sized avatar
💭
I may be slow to respond.

windwp

💭
I may be slow to respond.
View GitHub Profile
@windwp
windwp / Seriazile and Deserialize.cs
Last active November 2, 2015 10:19
C# useful function
/// <summary>Serializes the specified object as a JSON string</summary>
/// <param name="objectToSerialize">Specified object to serialize</param>
/// <returns>JSON string of serialzied object</returns>
private static string Serialize(object objectToSerialize)
{
using (System.IO.MemoryStream _Stream = new System.IO.MemoryStream())
{
try
{
var _Serializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(objectToSerialize.GetType());
@windwp
windwp / Xpath collection
Last active November 2, 2015 10:16
xpath
xpath no child
//*[count(*)=0]
xpath attribute
/div[@class='td_block_inner']
@windwp
windwp / itween
Last active January 30, 2016 13:09
unity get angle and rotatioin by speed
iTween.ValueTo(_maskPanel.gameObject, iTween.Hash(
"onupdate", "_showMaskEffSizeDelta",
"from", Vector2.zero,
"to", new Vector2(1200, 1200),
"easetype", iTween.EaseType.easeInCirc,
"onupdatetarget", this.gameObject,
"time", timeOfEffect
));
iTween.ValueTo(_maskPanel.gameObject, iTween.Hash(
"onupdate", "_showMaskEffPosition",
@windwp
windwp / skill form them
Last active August 29, 2015 14:06
skill form them
https://skill.codeplex.com/
inurl:ftp -inurl:http -inurl:https .css
@windwp
windwp / Form sniplet
Last active August 29, 2015 14:06
Form sniplet
public void LogText(string message)
{
log_rtb.Invoke(((MethodInvoker)delegate
{
log_rtb.AppendText(String.Format("-{0}: \r\n", message));
}));
}
protected void ClearText()