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
| // 2006 - DS | |
| #include "windows.h" | |
| #include "stdio.h" | |
| char *Mid(char *str, int start, int length); | |
| char *Left(char *str, int length); | |
| char *Right(char *str, int length); | |
| int Asc(char *str); | |
| char Chr(int value); |
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
| <!-- | |
| Based on the article: | |
| * https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/gestures/pinch | |
| * https://github.com/xamarin/xamarin-forms-samples/tree/master/WorkingWithGestures/PinchGesture | |
| --> | |
| <StackLayout> | |
| <Label Text="Xamarin Forms- Pinch Gesture in Android and UWP" | |
| VerticalOptions="Center" HorizontalOptions="Center" | |
| FontSize="Large" | |
| TranslationX="0" TranslationY="50" /> |
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
| using System; | |
| using System.IO; | |
| using System.Runtime.InteropServices; | |
| using System.Text.RegularExpressions; | |
| using System.Text; | |
| using System.Xml; | |
| using Mono.Unix; | |
| using Tomboy; | |
| public class InsertBugAction : SplitterAction |
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
| using log4net; | |
| namespace XenoInc.Gist | |
| { | |
| private static readonly ILog Log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
| [STAThread] | |
| private static void Main() | |
| { | |
| // Initialize log4net. | |
| log4net.Config.XmlConfigurator.Configure(); |
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 XenoInc.Gist | |
| { | |
| public static class Test | |
| { | |
| /// <summary> | |
| /// Execute on UI thread asynchronously (don't wait for completion) | |
| /// </summary> | |
| /// <param name="control"></param> | |
| /// <param name="code"></param> | |
| /// <example> |
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
| public static void Main() | |
| { | |
| DoubleLinkedList list = new DoubleLinkedList(); | |
| list.Insert("1"); | |
| list.Insert("2"); | |
| list.Insert("3"); | |
| DoubleLink link4 = list.Insert("4"); | |
| list.Insert("5"); | |
| Console.WriteLine("List: " + list); |
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
| /// ---------------------------------------------------------------------------- | |
| /// <summary>Convert from String^ to std::string</summary> | |
| System::Void TestClass::MarshalString(String ^ strIn, string& strOut) | |
| { | |
| using namespace Runtime::InteropServices; | |
| const char* chars = (const char*)(Marshal::StringToHGlobalAnsi(strIn)).ToPointer(); | |
| strOut = chars; | |
| Marshal::FreeHGlobal(IntPtr((void*)chars)); | |
| } | |
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
| using System.Diagnostics; | |
| // ... | |
| Stopwatch sw = new Stopwatch(); | |
| sw.Start(); | |
| // ... | |
| sw.Stop(); | |
| Console.WriteLine("Elapsed={0}", sw.Elapsed); |
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
| using System.IO; | |
| using System.Reflection; | |
| using System.Runtime.InteropServices; | |
| using System.Text; | |
| namespace Xeno.Tools; | |
| public class IniFile | |
| { | |
| private const string INI_EXT = ".ini"; |
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
| // | |
| // Used to create a Combined GUID for database Primary Keys | |
| // | |
| public Guid GenerateComb() | |
| { | |
| // T-SQL Equivalent | |
| // DECLARE @guid UNIQUEIDENTIFIER; | |
| // SET @guid = CAST(CAST(NEWID() AS BINARY(10)) + CAST(GETDATE() AS BINARY(6)) AS UNIQUEIDENTIFIER); | |
| // SELECT @guid; |