This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//from https://hackernoon.com/please-dont-use-offset-and-limit-for-your-pagination-8ux3u4y | |
//BAD | |
SELECT + FRM table_name LIMIT 10 OFFSET 40 | |
//GOOD | |
SELECT + FRM table_name WHERE id > 40 LIMIT 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//MyEntryRenderer : EntryRenderer | |
//for android | |
if (Control != null) | |
{ | |
Control.SetBackgroundColor(global::Android.Graphics.Color.LightYellow); | |
Control.SetCursorVisible(false); | |
Control.SetPadding(0, 0, 0, 0); | |
Control.Gravity = GravityFlags.CenterVertical | GravityFlags.Left; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//XAML | |
WidthRequest = "{x:OnPlatform Android=20, iOS=15, Default=20}" | |
Source = "{x:OnPlatform iOS='icon1.png', Android='icon2.png'}" | |
<OnPlatform x:Key="color" x:TypeArguments="x:String"> | |
<On Platform="Android" Value="Red" /> | |
<On Platform="iOS" Value="Orange" /> | |
</OnPlatform> | |
//CSharp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Label | |
Text="" | |
FontFamily="fa5_solid.otf#fa-solid" | |
FontSize="20" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<StackLayout.Resources> | |
<ResourceDictionary> | |
<Style TargetType="Label"> | |
<Setter Property="HorizontalOptions" Value="End" /> | |
</Style> | |
</ResourceDictionary> | |
</StackLayout.Resources> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BtnTop.TranslateTo(0, -70), | |
BtnTop.FadeTo(1), | |
BtnLeft.TranslateTo(-70, 0), | |
BtnLeft.FadeTo(1), | |
ActionBtn.FadeTo(0.4) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
x:Class | |
xmlns, xmlns:x, xmlns:d, xmlns:mc, mc:Ignorable, xmlns:* | |
x:Key, Key, x:Name, Name, x:Uid, Uid, Title | |
x:TypeArguments, x:DataType, x:* | |
BindingContext, TabIndex | |
Grid.Row*, Grid.Column*, RowSpacing, ColumnSpacing, AbsoluteLayout.LayoutFlags, AbsoluteLayout.LayoutBounds | |
IsVisible | |
Style* | |
WidthRequest, HeightRequest, MinimumWidthRequest, MinimumHeightRequest, M*Width, M*Height |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.InitializeComponent (); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//case 1: First | |
try | |
{ | |
var result1 = List.First(x => x == "foo"); | |
} | |
catch (Exception) | |
{ | |
//catch | |
} |