Tutorial by Examples: e

The @import statement allows you to insert CSS/Less code from another file into your own CSS/Less file. .foo { background: #900; } @import "my-other-css-file.css"; @import "my-other-less-file.less";
Import the class, which contains the method to be tested. Perform the operation with dummy data. Now compare the result of operation with expected result. - (void)testReverseString{ NSString *originalString = @"hi_my_name_is_siddharth"; NSString *reversedString = [self.someObject ...
- (void)testDoSomethingThatTakesSomeTime{ XCTestExpectation *completionExpectation = [self expectationWithDescription:@"Long method"]; [self.someObject doSomethingThatTakesSomeTimesWithCompletionBlock:^(NSString *result) { XCTAssertEqualObjects(@"result", result, @"Re...
1. For Synchronous methods : - (void)testPerformanceReverseString { NSString *originalString = @"hi_my_name_is_siddharth"; [self measureBlock:^{ [self.someObject reverseString:originalString]; }]; } 2. For Asynchronous methods : - (void)testPerformanceOfAsynch...
Run all tests by choosing Product > Test. Click the Test Navigator icon to view the status and results of the tests. You can add a test target to a project (or add a class to a test) by clicking the Add (plus) button in the bottom-left corner of the test navigator. To view the source code for a ...
Make sure that include unit test case box is checked when creating a new project as shown below:
You want to add a signature to a PDF in a way that a standard conform PDF viewer (e.g. Adobe Reader) will recognize, display, and validate as an integrated PDF signature. In that case you cannot simply externally create a signature covering the original PDF as is and expect to now have to merely so...
If multiple signatures are to be integrated into a PDF, this is done by means of incremental PDF updates (explicitly not by adding multiple SignerInfo structures to a single integrated CMS signature container!): The cryptographic verification of these signatures merely guarantees that the byte ra...
Install PDFTK Server from https://www.pdflabs.com/tools/pdftk-server/ PDFtk Server is a command line tool which can: • Merge PDF Documents or Collate PDF Page Scans • Split PDF Pages into a New Document • Rotate PDF Documents or Pages • Decrypt Input as Necessary (Password Required...
The way Moment uses dates and times is by wrapping the existing Date() object in a moment() object and specifying useful and intuitive methods on this object. Format Dates moment().format('MMMM Do YYYY, h:mm:ss a'); // August 4th 2016, 10:41:45 am moment().format('dddd'); // Th...
Functions are found by first collecting a set of "associated classes" and "associated namespaces" that include one ore more of the following, depending on the argument type T. First, let us show the rules for classes, enumeration and class template specialization names. If T i...
This example demonstrates how you can respond to a button click by performing some work on a worker thread and then update the user interface to indicate completion void MyButton_OnClick(object sender, EventArgs args) { Task.Run(() => // Schedule work using the thread pool { ...
C++11 Motivational example When you have a variadic template pack in the template parameters list, like in the following code snippet: template<typename ...Args> void func(Args &&...args) { //... }; The standard library (prior to C++17) offers no direct way to write enable_if...
psycopg2 is the most popular PostgreSQL database adapter that is both lightweight and efficient. It is the current implementation of the PostgreSQL adapter. Its main features are the complete implementation of the Python DB API 2.0 specification and the thread safety (several threads can share t...
var a = new List<int> { 1, 2 }; var b = new List<int> { 2, 1 }; Assert.That (a, Is.EqualTo(b)); // fails Assert.That (a, Is.EquivalentTo(b)); // succeeds
<Image x:Name="MyImage" /> // Show image from web MyImage.Source = new BitmapImage(new Uri("http://your-image-url.com")) // Show image from solution MyImage.Source = new Uri("ms-appx:///your-image-in-solution", UriKind.Absolute) // Show image from file ...
<TextBlock x:Name="MyControl" Text="Hello, world!" /> var rtb = new RenderTargetBitmap(); await rtb.RenderAsync(MyControl); // Render control to RenderTargetBitmap // Get pixels from RTB IBuffer pixelBuffer = await rtb.GetPixelsAsync(); byte[] pixels = ...
IRandomAccessStreamReference bitmap = GetBitmap(); IRandomAccessStreamWithContentType stream = await bitmap.OpenReadAsync(); BitmapDecoder decoder = await BitmapDecoder.CreateAsync(stream); var pixels = await decoder.GetPixelDataAsync(); var outStream = new InMemoryRandomAccessStream(); // Cr...
Value is available both in configuration and run phases. angular.module('app',[]) .value('endpoint', 'http://some.rest.endpoint') // define .run(function(endpoint) { // do something with endpoint // only available in run phase }) .controller('MainCtrl', function(endpoint) { ...
Service is available in run phase. The Service recipe produces a service just like the Value or Factory recipes, but it does so by invoking a constructor with the new operator. The constructor can take zero or more arguments, which represent dependencies needed by the instance of this type. ...

Page 628 of 1191