Skip to content

Instantly share code, notes, and snippets.

🏠
Working

Ivan Terekhin JEuler

🏠
Working
Block or report user

Report or block JEuler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View isIntentAvailable.java
// check intent for run
public boolean isIntentAvailable(Intent intent) {
PackageManager packageManager = getPackageManager();
List<ResolveInfo> activities = packageManager.queryIntentActivities(intent, 0);
return activities.size() > 0;
}
@JEuler
JEuler / ctxvm.DotSettings
Created Feb 6, 2015
Context for View (MVVM light)
View ctxvm.DotSettings
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=78FA8D85D5112D46B0C0176BBE4641C5/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=78FA8D85D5112D46B0C0176BBE4641C5/Shortcut/@EntryValue">ctxvm</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=78FA8D85D5112D46B0C0176BBE4641C5/Text/@EntryValue">DataContext="{Binding $NAME$, Source={StaticResource Locator}}"</s:String>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=78FA8D85D5112D46B0C0176BBE4641C5/Reformat/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=78FA8D85D5112D46B0C0176BBE4641C5/ShortenQuali
@JEuler
JEuler / res.DotSettings
Last active Dec 31, 2015
Res live template for Resharper, useful for localization.
View res.DotSettings
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=2CC977F4AE46A64FB65FC6859877C200/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=2CC977F4AE46A64FB65FC6859877C200/Shortcut/@EntryValue">res</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=2CC977F4AE46A64FB65FC6859877C200/Text/@EntryValue">{Binding Path=LocalizedResources.$RESOURCE_NAME$, Source={StaticResource LocalizedStrings}}</s:String>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=2CC977F4AE46A64FB65FC6859877C200/Reformat/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=2CC977F4AE46A64FB65
@JEuler
JEuler / cmdCS.DotSettings
Created Sep 19, 2013
CMD template for MVVM stuff in .cs files
View cmdCS.DotSettings
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=5514B69ED2205C46A8053CB3E6013819/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=5514B69ED2205C46A8053CB3E6013819/Shortcut/@EntryValue">cmd</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=5514B69ED2205C46A8053CB3E6013819/Description/@EntryValue">Command in MVVM .cs</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=5514B69ED2205C46A8053CB3E6013819/Text/@EntryValue">public ICommand $Name$Command { get; private set; }&#xD;
private void $Name$()&#xD;
{&#xD;
$END$&#xD;
} </s:String>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplate
@JEuler
JEuler / cmd.DotSettings
Created Sep 10, 2013
Resharper Live Template for Command-Method thing, within MVVM
View cmd.DotSettings
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=A5EC5B6595190D44B55F260E55AE9B01/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=A5EC5B6595190D44B55F260E55AE9B01/Shortcut/@EntryValue">trig</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=A5EC5B6595190D44B55F260E55AE9B01/Description/@EntryValue">Create interaction trigger.</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=A5EC5B6595190D44B55F260E55AE9B01/Text/@EntryValue">&lt;i:Interaction.Triggers&gt;&#xD;
&lt;i:EventTrigger EventName="$EventName$"&gt;&#xD;
&lt;cmd:EventToCommand Command="{Binding $Command$}" /&gt;&#xD;
&l
@JEuler
JEuler / propn.DotSettings
Created Sep 10, 2013
Gist for INotifyPropertyChanged Property within Resharper Live Template
View propn.DotSettings
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=7F89BC92CB2B9341B730F25D72B06C03/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=7F89BC92CB2B9341B730F25D72B06C03/Shortcut/@EntryValue">propn</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=7F89BC92CB2B9341B730F25D72B06C03/Description/@EntryValue">Property with RaisePropertyChanged</s:String>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=7F89BC92CB2B9341B730F25D72B06C03/Text/@EntryValue">private $Type$ _$pName$;&#xD;
public $Type$ $Name$&#xD;
{&#xD;
get { return _$pName$; }&#xD;
set&#xD;
{&#xD;
You can’t perform that action at this time.