Tutorial by Examples: o

print "Hello World" import clr from System import Console Console.WriteLine("Hello World")
Introduces the definition of a union type. // Example is from POSIX union sigval { int sival_int; void *sival_ptr; }; Introduces an elaborated type specifier, which specifies that the following name is the name of a union type. If the union name has been declared alread...
If you're using an icon to add some extra decoration or branding, it does not need to be announced to users as they are navigating your site or app aurally. Additionally, if you're using an icon to visually re-emphasize or add styling to content already present in your HTML, it does not need to be r...
An incomplete type; it is not possible for an object to have type void, nor are there arrays of void or references to void. It is used as the return type of functions that do not return anything. Moreover, a function may redundantly be declared with a single parameter of type void; this is equivale...
Given the 4 points of a cubic Bezier curve the following function returns its length. Method: The length of a cubic Bezier curve does not have a direct mathematical calculation. This "brute force" method finds a sampling of points along the curve and calculates the total distance spanne...
PM> uninstall-Package EntityFramework -Version 6.1.2
When writing wrappers for unmanaged resources, you should subclass SafeHandle rather than trying to implement IDisposable and a finalizer yourself. Your SafeHandle subclass should be as small and simple as possible to minimize the chance of a handle leak. This likely means that your SafeHandle imple...
A type qualifier; when applied to a type, produces the volatile-qualified version of the type. Volatile qualification plays the same role as const qualification in the type system, but volatile does not prevent objects from being modified; instead, it forces the compiler to treat all accesses to suc...
Value-type fields only C++ declaration typedef union { char c; int i; } CharOrInt; C# declaration [StructLayout(LayoutKind.Explicit)] public struct CharOrInt { [FieldOffset(0)] public byte c; [FieldOffset(0)] public int i; } Mixing value-type and reference...
Right click on the solution, Add new project From the Test section, select an Unit Test Project Pick a name for the assembly - if you are testing project Foo, the name can be Foo.Tests Add a reference to the tested project in the unit test project references
MSTest (the default testing framework) requires you to have your test classes decorated by a [TestClass] attribute, and the test methods with a [TestMethod] attribute, and to be public. [TestClass] public class FizzBuzzFixture { [TestMethod] public void Test1() { //arrange...
var serialPort = new SerialPort("COM1", 9600, Parity.Even, 8, StopBits.One); serialPort.Open(); serialPort.WriteLine("Test data"); string response = serialPort.ReadLine(); Console.WriteLine(response); serialPort.Close();
string[] portNames = SerialPort.GetPortNames();
void SetupAsyncRead(SerialPort serialPort) { serialPort.DataReceived += (sender, e) => { byte[] buffer = new byte[4096]; switch (e.EventType) { case SerialData.Chars: var port = (SerialPort)sender; int bytesToRead = p...
using System.IO.Ports; namespace TextEchoService { class Program { static void Main(string[] args) { var serialPort = new SerialPort("COM1", 9600, Parity.Even, 8, StopBits.One); serialPort.Open(); string message = &quot...
using System; using System.Collections.Generic; using System.IO.Ports; using System.Text; using System.Threading; namespace AsyncReceiver { class Program { const byte STX = 0x02; const byte ETX = 0x03; const byte ACK = 0x06; const byte NAK = 0x15...
Detailed instructions on getting active-directory set up or installed.
php bin/magento setup:di:compile You might need to delete var/di (including the folder) in order to go through compilation. rm -rf var/di
Enable and upgrade setup php bin/magento module:enable YKM_Custom php bin/magento setup:upgrade Disable the Module php bin/magento module:disable YKM_Custom Another One - module uninstall script is executed and whole module gets deleted afterwards. Only modules installed through Composer ca...
In addition to image classification datasets, Caffe also have "HDF5Data" layer for arbitrary inputs. This layer requires all training/validation data to be stored in hdf5 format files. This example shows how to use python h5py module to construct such hdf5 file and how to setup caffe &quo...

Page 569 of 1038