Skip to content

Instantly share code, notes, and snippets.

View dearsherlock's full-sized avatar

Sherlock Tsai dearsherlock

View GitHub Profile
<xml>
<a r="err">
</a>
</xml>
@dearsherlock
dearsherlock / 0_reuse_code.js
Last active August 29, 2015 14:09
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
@dearsherlock
dearsherlock / gist:f918e79d69bc224ace38
Last active August 29, 2015 14:18
dagger injection
class CoffeeMaker {
@Inject Lazy<Heater> heater; // Don't want to create a possibly costly heater until we need it.
@Inject Pump pump;
......
class Thermosiphon implements Pump {
private final Heater heater;
@Inject
@dearsherlock
dearsherlock / gist:4011389c0d08f765871c
Created March 31, 2015 13:08
error when build viewpagerindicator at xamarin.android.support.v4 21.0.0 upper
1>------ Build started: Project: ViewPagerIndicator, Configuration: Debug Any CPU ------
1> Reading AcwMapFile: Z:\Volumes\MySD\Download\viewpager\viewpager_source_WinVS\ViewPagerIndicator\ViewPagerIndicator\obj\Debug\acw-map.txt
1> AcwMapFile: ViewPagerIndicator.TestFragment = viewpagerindicator.TestFragment
1> AcwMapFile: ViewPagerIndicator.TestFragmentAdapter = viewpagerindicator.TestFragmentAdapter
1> AcwMapFile: ViewPagerIndicator.BaseSampleActivity = viewpagerindicator.BaseSampleActivity
1> AcwMapFile: ViewPagerIndicator.ActivityListItem = viewpagerindicator.ActivityListItem
1> AcwMapFile: ViewPagerIndicator.TestTitleFragmentAdapter = viewpagerindicator.TestTitleFragmentAdapter
1> AcwMapFile: ViewPagerIndicator.SampleCirclesDefault = viewpagerindicator.SampleCirclesDefault
1> AcwMapFile: ViewPagerIndicator.SampleCirclesInitialPage = viewpagerindicator.SampleCirclesInitialPage
1> AcwMapFile: ViewPagerIndicator.SampleCirclesSnap = viewpagerindicator.SampleCirclesSnap
@dearsherlock
dearsherlock / gist:a6f13604ffe8a81291d9
Created March 31, 2015 13:12
success build 20.0.4
1>------ Build started: Project: ViewPagerIndicator, Configuration: Debug Any CPU ------
1> Reading AcwMapFile: Z:\Volumes\MySD\Download\viewpager\viewpager_source_WinVS\ViewPagerIndicator\ViewPagerIndicator\obj\Debug\acw-map.txt
1> AcwMapFile: ViewPagerIndicator.TestFragment = viewpagerindicator.TestFragment
1> AcwMapFile: ViewPagerIndicator.TestFragmentAdapter = viewpagerindicator.TestFragmentAdapter
1> AcwMapFile: ViewPagerIndicator.BaseSampleActivity = viewpagerindicator.BaseSampleActivity
1> AcwMapFile: ViewPagerIndicator.ActivityListItem = viewpagerindicator.ActivityListItem
1> AcwMapFile: ViewPagerIndicator.TestTitleFragmentAdapter = viewpagerindicator.TestTitleFragmentAdapter
1> AcwMapFile: ViewPagerIndicator.SampleCirclesDefault = viewpagerindicator.SampleCirclesDefault
1> AcwMapFile: ViewPagerIndicator.SampleCirclesInitialPage = viewpagerindicator.SampleCirclesInitialPage
1> AcwMapFile: ViewPagerIndicator.SampleCirclesSnap = viewpagerindicator.SampleCirclesSnap
@dearsherlock
dearsherlock / gist:1ecadae42c7543386172
Created April 1, 2015 05:59
annotation of xamarin.android
[Activity(Label = "Circles/With Listener3")]
[IntentFilter(new[] { Intent.ActionMain }, Categories = new[] { "mono.viewpagerindicator.sample" })]
public class ProductTour : BaseActivity
{
...
}
@dearsherlock
dearsherlock / gist:344085576a2ac773168d
Created April 11, 2015 09:29
vs code snippet of mvvmcross command
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>MVVMCross Command</Title>
<Shortcut>commandm</Shortcut>
<Description>Code snippet of MVVM Command </Description>
<Author>Sherlock</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
@dearsherlock
dearsherlock / gist:8eb2984620d2fab396c2
Created December 23, 2015 03:15
animation.coffee
# Import file "Passcode"
passcode = Framer.Importer.load("imported/Passcode@1x")
instructionY=passcode.instructions.y
pincodeY=passcode.pinCode.y
passcode.instructions.y=Screen.height
passcode.pinCode.y=Screen.height
passcode.logo.scale=0
passcode.keyPad.opacity=0
@dearsherlock
dearsherlock / .coffee
Created December 23, 2015 05:56
loop obj animation
for lay in passcode.pinCode.subLayers
lay.scale=1
lay.animate
properties:
scale: 3
time:3
repeat:2
@dearsherlock
dearsherlock / .coffee
Created December 23, 2015 07:11
animation times
for lay in passcode.pinCode.subLayers
lay.scale=1
lay.animate
properties:
#設定元件的放大比例
scale: 3
#設定動畫的執行長度
time:3
#設定動畫的執行次數