Tutorial by Examples

Classes provide a way of creating your own types within the .NET framework. Within a class definition you may include the following: Fields Properties Methods Constructors Events To declare a class you use the following syntax: Public Class Vehicle End Class Other .NET types can...
If classes share common functionality you can group this in a base or abstract class. Abstract classes can contain partial or no implementation at all and allow the derived type to override the base implementation. Abstract classes within VisualBasic.NET must be declared as MustInherit and cannot ...
Converting between encodings is easy with C++11 and most compilers are able to deal with it in a cross-platform manner through <codecvt> and <locale> headers. #include <iostream> #include <codecvt> #include <locale> #include <string> using namespace std; i...
C++14 In C++14, this is easily done by std::mismatch which returns the first mismatching pair from two ranges: std::string prefix = "foo"; std::string string = "foobar"; bool isPrefix = std::mismatch(prefix.begin(), prefix.end(), string.begin(), string.end()).first == ...
You can provide help for message box in different ways. You can configure a MessageBox to show a Help button or not. Also you can configure MessageBox in a way that when the user requests for help by click on Help button or by pressing F1, it show a CHM file or navigate to a URL or perform a custom ...
You can provide help for OpenFileDialog, SaveFileDialog and ColorDialog. To do so set ShowHelp property of dialog to true and handle HelpRequest event for dialog: void openFileDialog1_HelpRequest(object sender, EventArgs e) { //Perform custom action Help.ShowHelp(this, "Http://examp...
When a user press F1 on a control or click on Help button of form (?) and then clicks on a control the HelpRequested event will be raised. You can handle this event to provide custom action when user requests help for controls or form. The HelpRequested supports bubble up mechanism. It fires for y...
You can use Help class in code, to provide these kinds of help: Show a help pop-up for a control Open a CHM file based on context (Show table of content, Show a keyword or index, show a topic) Navigate to a URL using default browser Show Help pop-up window You can use Help.ShowPopup to disp...
You can show a Help Button at title-bar of a Form. To do so, you should: Set HelpButton property of form to true. Set MinimizeBox and MaximizeBox to false. Then a help button will appear on title-bar of Form: Also when you click on Help button, the cursor will be changed to a ? cursor: ...
If you have a Form with MinimizeBox and MaximizeBox set to true, then you can not show Help button on title-bar of Form and will lose the feature of click on help button to convert it to help cursor to be able to click on controls to show help. You can make a menu item on MenuStrip act like standar...
You can detect when a user Clicked on a HelpButton on title-bar of form by handling HelpButtonClicked. You can let the event continue or cancel it by setting Cancel property of its event args to true. private void Form1_HelpButtonClicked(object sender, CancelEventArgs e) { e.Cancel = true; ...
SELECT product, SUM(quantity) AS "Total quantity" FROM order_details GROUP BY product;
Assume a table of employees in which each row is an employee who has a name, a department, and a salary. SELECT department, MIN(salary) AS "Lowest salary" FROM employees GROUP BY department; This would tell you which department contains the employee with the lowest salary, and what t...
You can create a set of radio buttons used to select an item from a list. It's possible to change the settings : selected : The initially selected value (character(0) for no selection) inline : horizontal or vertical width It is also possible to add HTML. library(shiny) ui <- fluidPa...
The protected internal keyword marks field, methods, properties and nested classes for use inside the same assembly or derived classes in another assembly: Assembly 1 public class Foo { public string MyPublicProperty { get; set; } protected internal string MyProtectedInternalPropert...
std::ostringstream can be used to convert any streamable type to a string representation, by inserting the object into a std::ostringstream object (with the stream insertion operator <<) and then converting the whole std::ostringstream to a std::string. For int for instance: #include <sst...
Below is a recursive code to reverse a string /** * Just a snippet to explain the idea of recursion * **/ public class Reverse { public static void main (String args[]) { String string = "hello world"; System.out.println(reverse(string)); //prints dlrow oll...
SELECT * FROM Cars WHERE status IN ( 'Waiting', 'Working' ) This is semantically equivalent to SELECT * FROM Cars WHERE ( status = 'Waiting' OR status = 'Working' ) i.e. value IN ( <value list> ) is a shorthand for disjunction (logical OR).
A pointer (resp. reference) to an object type can be converted to a pointer (resp. reference) to any other object type using reinterpret_cast. This does not call any constructors or conversion functions. int x = 42; char* p = static_cast<char*>(&x); // error: static_cast cannot perf...
Default behavior when cloning an object is to perform a shallow copy of the object's fields. In that case, both the original object and the cloned object, hold references to the same objects. This example shows that behavior. import java.util.List; public class Sheep implements Cloneable { ...

Page 468 of 1336