Tutorial by Examples: l

Rust has a default formatter for pointer types that can be used for displaying pointers. use std::ptr; // Create some data, a raw pointer pointing to it and a null pointer let data: u32 = 42; let raw_ptr = &data as *const u32; let null_ptr = ptr::null() as *const u32; // the {:p} mappi...
Overloading the addition operator (+) requires implement the std::ops::Add trait. From the documentation, the full definition of the trait is: pub trait Add<RHS = Self> { type Output; fn add(self, rhs: RHS) -> Self::Output; } How does it work? the trait is implemented for...
Objective-C UIGraphicsBeginImageContext(self.view.frame.size); [[UIImage imageNamed:@"image.png"] drawInRect:self.view.bounds]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); self.view.backgroundColor = [UIColor colorWithPatternIma...
HanlderManager providing: public class HandlerManagerProvider { private static HandlerManager handlerManager; private HandlerManagerProvider() { } public static HandlerManager get() { return handlerManager != null ? handlerManager : (handlerManager =...
Processing provides a method named line() to draw a line on the screen. This code draws a white 10 pixel line on black background. void setup() { size(500, 500); background(0); stroke(255); strokeWeight(10); } void draw() { line(0, 0, 500, 500); } The signature of m...
Objective-C Just log this see how to use a particular filter NSArray *properties = [CIFilter filterNamesInCategory:kCICategoryBuiltIn]; for (NSString *filterName in properties) { CIFilter *fltr = [CIFilter filterWithName:filterName]; NSLog(@"%@", [fltr a...
Detailed instructions on getting doxygen set up or installed.
Detailed instructions on getting pagination set up or installed.
Presumably the simplest way to use compose is with a View only. This allows you to include HTML templates without the need to declare a ViewModel with bindable properties for each of them, making it easier to reuse smaller pieces of HTML. The BindingContext (ViewModel) of the View will be set to th...
Using compose with a View, ViewModel and Model is an easy way to reuse and combine different Views and ViewModels. Given the following View and ViewModel (applies to each alternative below): src/greeter.html <template> <h1>Hello, ${name}!</h1> </template> src/gree...
public class InsertionSort { public static void SortInsertion(int[] input, int n) { for (int i = 0; i < n; i++) { int x = input[i]; int j = i - 1; while (j >= 0 && input[j] > x) { input...
The following documentation describes both MySQLi and PDO supported pagination solution. Go to https://github.com/rajdeeppaul/Pagination and download pagination.php file into your project directory. Let's say your directory structure looks like this: project directory | |--paginati...
There are quite a number situations where one has huge amounts of data and using which he has to classify an object in to one of several known classes. Consider the following situations: Banking: When a bank receives a request from a customer for a bankcard, the bank has to decide whether to issue...
Let's say we have 8 houses. We want to setup telephone lines between these houses. The edge between the houses represent the cost of setting line between two houses. Our task is to set up lines in such a way that all the houses are connected and the cost of setting up the whole connection is mini...
FullCalendar can be downloaded from it's website: https://fullcalendar.io/download/ from NPM: $ npm install fullcalendar from Bower: $ bower install fullcalendar or CDNJS: //cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.0.1/fullcalendar.min.js //cdnjs.cloudflare.com/ajax/libs/fullca...
Depending on your target machine, you need to choose a supported ROS Version (or vice-versa). Although ROS installation is well documented in the ROS wiki, It might be confusing to find them. So, here's a table of the ROS Version, target platforms & architecture and the links for the appropriate...
class Program { static void Main(string[] args) { //Initialize a new container WindsorContainer container = new WindsorContainer(); //Register IService with a specific implementation and supply its dependencies container.Register(Component.For<ISer...
COBOL ***************************************************************** * Example of LINAGE File Descriptor * Tectonics: $ cocb -x linage.cob * $ ./linage <filename ["linage.cob"]> * $ cat -n mini-report ***********************...
IF lv_foo = 3. WRITE: / 'lv_foo is 3'. ELSEIF lv_foo = 5. WRITE: / 'lv_foo is 5'. ELSE. WRITE: / 'lv_foo is neither 3 nor 5'. ENDIF.
When run with no arguments, this program starts a TCP socket server that listens for connections to 127.0.0.1 on port 5000. The server handles each connection in a separate thread. When run with the -c argument, this program connects to the server, reads the client list, and prints it out. The clie...

Page 614 of 861