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
<?xml version="1.0" encoding="utf-8" ?> | |
<Application xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="ThemeDemo.App"> | |
<Application.Resources> | |
<ResourceDictionary> | |
<Color x:Key="BackgroundColorDark">#121212</Color> | |
<Color x:Key="BackgroundColorLight">#ffffff</Color> | |
<Color x:Key="BackgroundColorBrown">#292220</Color> | |
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
<?xml version="1.0" encoding="utf-8"?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:local="clr-namespace:Watch" | |
x:Class="Watch.WatchPage"> | |
<Grid> | |
<Grid x:Name="hourBox" | |
HorizontalOptions="Center" | |
VerticalOptions="Fill"> | |
<Grid.RowDefinitions> |
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
string Stars(int lineCount) | |
{ | |
string num = ""; | |
return string.Join('\n', (from item in Enumerable.Range(1, lineCount) select num += "*").ToArray()); | |
} | |
Console.WriteLine(Stars(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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>net46</TargetFramework> | |
</PropertyGroup> | |
</Project> |
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
#!/bin/bash | |
while [[ $# -gt 0 ]]; do | |
key="$1" | |
case $key in | |
-c|--clean) | |
CLEAN=1 | |
;; | |
-r|--restore) |
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
namespace WinFormsUtil | |
{ | |
public static class ListViewUtils | |
{ | |
public static void SetSource<T>(this ListView.ListViewItemCollection items, IEnumerable<T> source, Func<T, ListViewItem> func) | |
{ | |
items.Clear(); | |
items.AddRange(source.Select(func).ToArray()); | |
} |
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
var originArray = Enumerable.Range(1, 10).ToList(); | |
IEnumerable<int> subArray = originArray.Where(x => x != 0); // works with originArray | |
IEnumerable<int> subArray = originArray.Where(x => x != 0).ToList(); // creates new array | |
while (subArray.Count() > 0) | |
{ | |
var item = subArray.First(); | |
originArray.Remove(item); | |
Console.WriteLine(item); |
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
inotifywait --monitor --timefmt '%F %T' --format '%T %w %e %f' $1 -e create -e delete |
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
inotifywait --monitor --timefmt '%F %T' --format '%T %w %e %f' $1 -e create -e delete |
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
test -e /file/path ; [[ $? = 0 ]] && echo True || echo False |
OlderNewer