Skip to content

Instantly share code, notes, and snippets.

View furi2's full-sized avatar

Kaori furi2

  • Los Angeles, CA
View GitHub Profile
@furi2
furi2 / PaintView.cs
Created February 19, 2014 06:28
PaintView, For Hand Drawing on a Drawable Image (Xamarin)
using System;
using Android.App;
using Android.Content;
using Android.Views;
using Android.Widget;
using Android.Graphics;
using Android.Util;
namespace ArborTrac.Droid.UI.Controls
{
@furi2
furi2 / Activity1.cs
Last active October 31, 2016 16:19
Handling SearchView in Xamarin.Android using OnActionExpandListener Class
override public bool OnCreateOptionsMenu(IMenu menu)
{
MenuInflater inflater = this.MenuInflater;
inflater.Inflate(Resource.Menu.NoteListActions, menu);
IMenuItem item;
item = menu.FindItem(Resource.Id.action_search);
SearchManager searchManager = (SearchManager)GetSystemService(Context.SearchService);
SearchView searchView = (SearchView)item.ActionView;
searchView.SetSearchableInfo(searchManager.GetSearchableInfo(this.ComponentName));
@furi2
furi2 / gist:1381765
Created November 21, 2011 05:48
Upload test code ASP.NET (Upload.aspx)
using System;
using System.Web;
using System.Web.UI;
using System.IO;
public partial class Upload : System.Web.UI.Page
{
protected void Page_Load( object sender, EventArgs e )
{
string root_path = Server.MapPath("~/");
@furi2
furi2 / gist:1378595
Created November 19, 2011 07:36
Uploading multipart/form-data type data from Titanium
var content = '';
var boundary = '---------------------------170062046428149';
content += '--'+ boundary + '\r\n';
content += 'Content-Disposition: form-data; name="uploadToken"\r\n';
content += '\r\n';
content += upload_token + '\r\n';
content += '--'+ boundary + '\r\n';
content += 'Content-Disposition: form-data; name="destFolderPath"\r\n';
content += '\r\n';