Tutorial by Examples

The following C code uses the OpenMP parallel programming model to write the thread ID and number of threads to stdout using multiple threads. #include <omp.h> #include <stdio.h> int main () { #pragma omp parallel { // ID of the thread in the current team ...
HTML <div> Even if this div is too small to display its contents, the content is not clipped. </div> CSS div { width:50px; height:50px; overflow:visible; } Result Content is not clipped and will be rendered outside the content box if it exceeds its co...
DisplayName sets display name for a property, event or public void method having zero (0) arguments. public class Employee { [DisplayName(@"Employee first name")] public string FirstName { get; set; } } Simple usage example in XAML application <Window x:Class="WpfA...
EditableAttribute sets whether users should be able to change the value of the class property. public class Employee { [Editable(false)] public string FirstName { get; set; } } Simple usage example in XAML application <Window x:Class="WpfApplication.MainWindow" ...
First of all we need to add SQLite support to our application. There are two ways of doing that Download DLL suiting your system from SQLite download page and then add to the project manually Add SQLite dependency via NuGet We'll do it the second way First open the NuGet menu and search f...
You can use a method annotated with @testSetup to write code that will have been executed before each test run: public class AccountService { public static Account fetchAccount() { return [ SELECT Id, Name FROM Account LIMIT 1 ]; } } @isTest public class AccountServiceTest { priv...
While you can use the @testSetup annotation to designate a method to be run before tests are executed, this method will usually only be run once. If you need code to be run before each test, you can use a static block: @isTest public class MyTest { static { // code here will be run before ...
The browser identifies tokens from stylesheet and coverts them into nodes which are linked into a tree structure. The entire map of all the nodes with their associated styles of a page would be the CSS Object Model. To display the webpage, a web browser takes following steps. The web browser exa...
using (SQLiteConnection conn = new SQLiteConnection(@"Data Source=data.db;Pooling=true;FailIfMissing=false")) { conn.Open(); using (SQLiteCommand cmd = new SQLiteCommand(conn)) { cmd.CommandText = "query"; using (SqlDataReader dr = cmd.ExecuteReade...
The two mapAccum functions combine the operations of folding and mapping. -- A Traversable structure -- | -- A seed value | ...
GDB, short for GNU Debugger, is the most popular debugger for UNIX systems to debug C and C++ programs. GNU Debugger, which is also called gdb, is the most popular debugger for UNIX systems to debug C and C++ programs. GNU Debugger helps you in getting information about the following: If a co...
Although GameplayKit (which is introduced with iOS 9 SDK) is about implementing game logic, it could also be used to generate random numbers, which is very useful in apps and games. Beside the GKRandomSource.sharedRandom which is used in the following chapters there are three additional types of GK...
A model can also be added to the partial view : @model Solution.Project.Namespace.MyModelClass <p>@Model.Property</p> In the View you can now just use: <div> @Html.Partial("PartialViewExample", new MyModelClass(){Property="my property value"}) <...
Charts can be created by working directly with the Series object that defines the chart data. In order to get to the Series without an exisitng chart, you create a ChartObject on a given Worksheet and then get the Chart object from it. The upside of working with the Series object is that you can s...
The starting point for the vast majority of charting code is to create an empty Chart. Note that this Chart is subject to the default chart template that is active and may not actually be empty (if the template has been modified). The key to the ChartObject is determining its location. The syntax...
For complete control over a new Chart and Series object (especially for a dynamic Series name), you must resort to modifying the SERIES formula directly. The process to set up the Range objects is straightforward and the main hurdle is simply the string building for the SERIES formula. The SERIES ...
A common chore with charts in Excel is standardizing the size and layout of multiple charts on a single sheet. If done manually, you can hold down ALT while resizing or moving the chart to "stick" to cell boundaries. This works for a couple charts, but a VBA approach is much simpler. Co...
If a type t is Traversable then values of t a can be split into two pieces: their "shape" and their "contents": data Traversed t a = Traversed { shape :: t (), contents :: [a] } where the "contents" are the same as what you'd "visit" using a Foldable insta...
pyquery is a jquery-like library for python. It has very well support for css selectors. from pyquery import PyQuery html = """ <h1>Sales</h1> <table id="table"> <tr> <td>Lorem</td> <td>46</td> </tr> &l...
Please note that continued use of Sublime Text requires that you purchase a license and you are asked to note the terms and conditions. The process of installing Sublime Text is different for each platform, but in each case you need to visit the download page. After installing ST3, it is common to...

Page 680 of 1336