This file contains 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
public static void Fade (this UIView view, bool isIn, double duration = 0.3, Action onFinished = null) | |
{ | |
var minAlpha = (nfloat)0.0f; | |
var maxAlpha = (nfloat)1.0f; | |
view.Alpha = isIn ? minAlpha : maxAlpha; | |
view.Transform = CGAffineTransform.MakeIdentity (); | |
UIView.Animate (duration, 0, UIViewAnimationOptions.CurveEaseInOut, | |
() => { | |
view.Alpha = isIn ? maxAlpha : minAlpha; |
This file contains 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 App1 | |
{ | |
using System; | |
using System.Linq; | |
using Windows.UI.Xaml.Controls; | |
using System.Reflection; | |
using Windows.UI.Xaml; | |
using System.Collections.Generic; | |
public static class UserControlExtensions |
This file contains 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
## Example call : & .\FormatTemplate.ps1 "test.txt" "out.txt" "1=TEST" , "other=128" ,"things=ok" , "unfound=o" | |
param | |
( | |
[string]$gfileIn, | |
[string]$gfileOut, | |
[string[]]$gvalues | |
) | |
## Replaces all mustache like occurences ("{{ key }}") in $fileIn content, with $values corresponding values and saves |
This file contains 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 Utils | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Reflection; | |
/// <summary> | |
/// Weak event handlers to avoid keeping strong reference to subscriber of an event. | |
/// </summary> | |
public static class WeakEventHandlers |
This file contains 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 SnapCollection | |
{ | |
using UIKit; | |
using CoreGraphics; | |
public class SnapLayout : UICollectionViewFlowLayout | |
{ | |
public SnapLayout() | |
{ | |
this.ItemSize = new CGSize(300, 250); |
This file contains 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
import 'dart:math' as math; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/src/rendering/sliver.dart'; | |
import 'package:flutter/src/rendering/sliver_grid.dart'; | |
class _CoordinateOffset { | |
final double main, cross; | |
_CoordinateOffset(this.main, this.cross); | |
} |
This file contains 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 Microsoft.Caboodle | |
{ | |
public interface IBattery | |
{ | |
void StartBatteryListeners(); | |
void StopBatteryListeners(); | |
double ChargeLevel { get; } |
This file contains 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
// Example of using parsed command to generate flutter code | |
var result = List<Code>(); | |
final SvgPathStringSource parser = new SvgPathStringSource(svg); | |
final SvgPathNormalizer normalizer = new SvgPathNormalizer(); | |
var segments = parser.parseSegments(); | |
for (PathSegmentData seg in segments) { | |
result.addAll(normalizer.emitSegment(seg).map((c) => Code(_generateCommand(c).toString() + ";"))); | |
} | |
This file contains 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
import 'package:flutter/material.dart'; | |
import 'package:rxdart/rxdart.dart'; | |
// Global application configuration and navigation | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) => MaterialApp(home: Home()); |
This file contains 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
import 'dart:math'; | |
import 'dart:ui'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { |
OlderNewer