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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>net48</TargetFramework> | |
<LangVersion>8.0</LangVersion> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> | |
</ItemGroup> | |
</Project> |
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
(?<![a-zA-Z0-9_]\s|\*|\*\s)const\s+(?!noexcept|override|final)(unsigned ((long )?long|int|short|char)|[a-zA-Z_:][a-zA-Z0-9_:]*(<([^>]+|(<[^>]+>))>)?)(?![a-zA-Z0-9_();={,]|\s[={]) |
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
var httpClientHandler = new HttpClientHandler | |
{ | |
Proxy = new WebProxy("http://192.168.1.2:8888", false), | |
UseProxy = true | |
}; | |
var httpClient = new HttpClient(httpClienthandler); |
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
// Put this line in initialization code | |
ServicePointManager.ServerCertificateValidationCallback = CheckCertificate; | |
private static bool CheckCertificate( | |
object sender, X509Certificate certificate, | |
X509Chain chain, SslPolicyErrors sslpolicyerrors) | |
{ | |
// public key for www.microsoft.com | |
const string rxpectedPublicKey = "3082010A0282010100CCEAE2843C1BA9352E015D159D854E91CDAC153F6EE5168E1E8803A5A041DA5D83350E83D4271C6DFAECA1C2493CC8864528B2BD00A5F4AADA935453A1DD3164EFBB8624A95FCAE82956CFB9B0619F7E1774CB67064B23A5B492DC7FFBF7D6D46378DFF1362F42787B5C2B8EA4B2A829F647530DDD48BB10CEF5F378E4B44F66446E3A9372C9700794CC950CEE177E0B7C0981FFB2C9ABD59A98AFDF1D3BD880894F9E16BCFA86E0420097C5CCC5D6CE76E9C2BB1DE354E3139CCF2641DA07D04E2AE2D9C927C44212117B07B116D257953F3C2A3E927C8A1EDA7699C6A0D6FED415573471203D3DDA65DD5448CBD8C67A1A870D935A4F7B3A98F303948E003B0203010001"; |
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 AppDelegate () | |
{ | |
// Initialize the Parse client with your Application ID and .NET Key found on | |
// your Parse dashboard | |
ParseClient.Initialize("YOUR APPLICATION ID", "YOUR .NET KEY"); | |
} |
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
#include <stdint.h> | |
#include "CLib.h" | |
int32_t clib_add(int32_t left, int32_t right) | |
{ | |
return clib_add_internal(left, right); | |
} |
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
using MvvmCross.Binding.BindingContext; | |
using MvvmCross.iOS.Views; | |
using iOSViewDemo.Core.ViewModels; | |
using UIKit; | |
namespace iOSViewDemo.iOS.Views | |
{ | |
public class CodeViewController : MvxViewController<FirstViewModel> | |
{ | |
private UILabel UiLabel { get; } = new UILabel { TranslatesAutoresizingMaskIntoConstraints = false }; |
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
private UIScrollView _scrollView; | |
private UIView _contentView; | |
public override void ViewDidLoad() | |
{ | |
base.ViewDidLoad(); | |
_scrollView = new UIScrollView | |
{ | |
ShowsHorizontalScrollIndicator = false, |
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
IObservable<byte> serialPortSource = Observable.FromEventPattern< | |
SerialDataReceivedEventHandler, | |
SerialDataReceivedEventArgs> | |
( | |
handler => _serialPort.DataReceived += handler, | |
handler => _serialPort.DataReceived -= handler | |
).SelectMany(_ => | |
{ | |
var buffer = new byte[1024]; | |
var ret = new List<byte>(); |
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 async Task<bool> DoesWebContentMatchPatternAsync(Uri uri, Regex pattern) | |
{ | |
HttpClient client = new HttpClient(); | |
string html = await client.GetStringAsync(); | |
bool matches = pattern.Matches(html); | |
return matches; | |
} |
NewerOlder