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
VSIXInstaller.SignatureMismatchException: The signature on the update version of 'NuGet Package Manager' does not match the signature on the installed version. Therefore, Extension Manager cannot install the update. |
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 override byte[] Create() | |
{ | |
var stream = new MemoryStream(); | |
using (var writer = new BinaryWriter(stream)) | |
{ | |
writer.Write(CommunicationAddress); | |
writer.Write(CommandId); | |
unchecked | |
{ |
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
Code: | |
internal static byte CalculateByteStuffingLength(byte[] dataLinkLayerFrame) | |
{ | |
byte resultat = 0; | |
foreach (byte b in dataLinkLayerFrame) | |
{ | |
if ((b == WriteStartByte) || (b == ReadStartByte) || (b == Stop) || (b == Acknowledgement) || (b == Stuff)) |
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 override void Execute(object parameter) | |
{ | |
var oldViewItem = meterTestViewModel.SelectedTestPointSequence; | |
if (oldViewItem == null) | |
{ | |
return; | |
} | |
var testPointSequenceCopy = oldViewItem.Save(); |
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
communicator = new MeterCommunicator("COM4") | |
{ | |
Timeout = TimeSpan.FromSeconds(5), | |
MaxRetries = 5, | |
}; | |
communicator.RunSequence | |
( | |
c => c.ReadRegister(1001).ContinueWith(t => Console.WriteLine(t.Result)), | |
c => c.ReadRegister(1002).ContinueWith(t => Console.WriteLine(t.Result)), |
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 Test | |
{ | |
public class PaulaBean | |
{ | |
private string paula = "Brillant"; | |
public string Paula | |
{ | |
get | |
{ |
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 Task<byte[]> WaitData(this SerialPort serialPort, TimeSpan timeout, byte[] request) | |
{ | |
var tcs = new TaskCompletionSource<byte[]>(); | |
SerialDataReceivedEventHandler handler = null; | |
Timer timer = null; | |
handler = (sender, e) => | |
{ | |
var package = serialPort.ReadPackage(); |
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
"Bob the Constructor" -----------------------+ | |
| | |
+----------------- "All your base are belong to us" | |
| | |
"Luke, I am your father!" -------+-----------+ | |
| | |
| +----------- "Locked!" | |
| | | |
+---+----------- "Extended!" | |
| | |
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
...snip... | |
[core] | |
editor = 'C:/Program Files (x86)/ConTEXT/ConTEXT.exe' | |
[merge] | |
keepBackup = false; | |
tool = p4merge | |
[mergetool "p4merge"] |
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
serialPort | |
.RequestResponse(MeterCommunicator.CreateRegisterPackage(1001), TimeSpan.FromSeconds(10), 3) | |
.ContinueWith(x => | |
{ | |
var register = MeterCommunicator.DecodeReadMeterRegister(x.Result); | |
if (register != null) | |
Console.WriteLine(register); | |
else | |
MeterCommunicator.PrintArray(x.Result); |