Tutorial by Examples: ect

If the target pattern doesn't contain slashes, make will remove the directory part from the target it's trying to build before matching. The directory will then be put in front of the stem. When the stem is used to build the target name and prerequisites, the directory part is stripped from it, the ...
Every time jQuery is called, by using $() or jQuery(), internally it is creating a new instance of jQuery. This is the source code which shows the new instance: // Define a local copy of jQuery jQuery = function( selector, context ) { // The jQuery object is actually just the init construct...
jQuery accepts a wide variety of parameters, and one of them is an actual DOM element. Passing a DOM element to jQuery will cause the underlying array-like structure of the jQuery object to hold that element. jQuery will detect that the argument is a DOM element by inspecting its nodeType. The mos...
Dynamic queries are SET @sql = N'SELECT COUNT(*) FROM AppUsers WHERE Username = ''' + @user + ''' AND Password = ''' + @pass + '''' EXEC(@sql) If value of user variable is myusername'' OR 1=1 -- the following query will be executed: SELECT COUNT(*) FROM AppUsers WHERE Username = 'myusername...
jQuery accepts a wide variety of parameters as "selectors", and one of them is an HTML string. Passing an HTML string to jQuery will cause the underlying array-like structure of the jQuery object to hold the resulting constructed HTML. jQuery uses regex to determine if the string being pa...
There are many reasons a write operation may fail. A frequent one is because your security rules reject the operation, for example because you're not authenticated (by default a database can only be accessed by an authenticated user). You can see these security rule violations in the output of your...
JSON_MODIFY function enables you to insert JSON objects into JSON text: declare @json nvarchar(4000) = N'{"Id":1,"Name":"Toy Car"}' set @json = JSON_MODIFY(@json, '$.Price', JSON_QUERY('{"Min":34.99,"Recommended":45.49}'))...
You can generate JSON object using standard SELECT query with FOR JSON clause and WITHOUT_ARRAY_WRAPPER option, and insert it into JSON text as a third parameter: declare @json nvarchar(4000) = N'{"Id":17,"Name":"WWI"}' set @json = JSON_MODIFY(@json, '$.table', ...
SELECT is an Open-SQL-statement for reading data from one or several database tables into data objects. Selecting All Records * This returns all records into internal table lt_mara. SELECT * FROM mara INTO lt_mara. Selecting Single Record * This returns single record if tabl...
Here we will create collection for losses of Neural Network's computational graph. First create a computational graph like so: with tf.variable_scope("Layer"): W = tf.get_variable("weights", [m, k], initializer=tf.zeros_initializer([m, k], dtype=tf.float32)) ...
Using the Constructor A ReadOnlyCollection is created by passing an existing IList object into the constructor: var groceryList = new List<string> { "Apple", "Banana" }; var readOnlyGroceryList = new ReadOnlyCollection<string>(groceryList); Using LINQ Additiona...
A ReadOnlyCollection cannot be edited directly. Instead, the source collection is updated and the ReadOnlyCollection will reflect these changes. This is the key feature of the ReadOnlyCollection. var groceryList = new List<string> { "Apple", "Banana" }; var readOnlyGroc...
If the source collection is of a type that is not immutable, elements accessed through a ReadOnlyCollection can be modified. public class Item { public string Name { get; set; } public decimal Price { get; set; } } public static void FillOrder() { // An order is generated ...
reflect.TypeOf can be used to check the type of variables when comparing package main import ( "fmt" "reflect" ) type Data struct { a int } func main() { s:="hey dude" fmt.Println(reflect.TypeOf(...
Delegate: UISearchBarDelegate, UISearchControllerDelegate, UISearchBarDelegate @property (strong, nonatomic) UISearchController *searchController; - (void)searchBarConfiguration { self.searchController = [[UISearchController alloc] initWithSearchResultsController:nil]; self.searchC...
void parallelAddition (unsigned N, const double *A, const double *B, double *C) { unsigned i; #pragma omp parallel for shared (A,B,C,N) private(i) schedule(static) for (i = 0; i < N; ++i) { C[i] = A[i] + B[i]; } } This example adds two vector (A and B into...
Nginx configuration to detect request from mobile user-agent and redirect them to mobile site. location / { #mobile site handling as per user agent set $mobile_rewrite do_not_perform; // variable to store action. default set to not perform redirection to mobile site. if ($htt...
@at-root directive can be used to localize variables. $color: blue; @at-root { $color: red; .a { color: $color; } .b { color: $color; } } .c { color: $color; } is compiled to: .a { color: red; } .b { color: red; } .c { color: blue; }
Protractor can selectively run groups of tests using fdescribe() instead of describe(). fdescribe('first group',()=>{ it('only this test will run',()=>{ //code that will run }); }); describe('second group',()=>{ it('this code will not run',()=>{ //code...
// Set up Express var express = require('express'); var app = express(); // Serve static assets from both 'public' and 'files' directory app.use(express.static('public'); app.use(express.static('files'); // Start Express server app.listen(3030);

Page 71 of 99