Tutorial by Examples: ee

Compares two values for equality. It can compare strings, integers, and Boolean values only. Assert.AreEqual(documentElement.LocalName, "xamlControls", "Xaml files must have a root node named 'xamlControls'.");
Quote is a special operator that prevents evaluation of its argument. It returns its argument, unevaluated. CL-USER> (quote a) A CL-USER> (let ((a 3)) (quote a)) A
git difftool -t meld --dir-diff will show the working directory changes. Alternatively, git difftool -t meld --dir-diff [COMMIT_A] [COMMIT_B] will show the differences between 2 specific commits.
Suppose you have a Dockerfile ending with ENTRYPOINT [ "nethogs"] CMD ["wlan0"] if you build this image with a docker built -t inspector . launch the image built with such a Dockerfile with a command such as docker run -it --net=host --rm inspector ,nethogs will monitor the...
If someone else wrote the code you are committing, you can give them credit with the --author option: git commit -m "msg" --author "John Smith <[email protected]>" You can also provide a pattern, which Git will use to search for previous authors: git commit -m &quo...
Use the rel="alternate" attribute to allow discoverability of your Atom/RSS feeds. <link rel="alternate" type="application/atom+xml" href="http://example.com/feed.xml" /> <link rel="alternate" type="application/rss+xml" href=&quo...
Table Setup CREATE TABLE dbo.Employees ( EmployeeID INT NOT NULL PRIMARY KEY, FirstName NVARCHAR(50) NOT NULL, LastName NVARCHAR(50) NOT NULL, ManagerID INT NULL ) GO INSERT INTO Employees VALUES (101, 'Ken', 'Sánchez', NULL) INSERT INTO Employees VALUES (102, 'Keith', ...
All these are shell commands. docker-machine env to get the current default docker-machine configuration eval $(docker-machine env) to get the current docker-machine configuration and set the current shell environment up to use this docker-machine with . If your shell is set up to use a proxy, yo...
2.1.x This example depends on Support Library 23.4.0.+. BottomSheetBehavior is characterized by : Two toolbars with animations that respond to the bottom sheet movements. A FAB that hides when it is near to the "modal toolbar" (the one that appears when you are sliding up). A backdr...
For cases when we don't want to write special classes to handle some resource, we may write a generic class: template<typename Function> class Finally final { public: explicit Finally(Function f) : f(std::move(f)) {} ~Finally() { f(); } // (1) See below Finally(const Final...
Follow previous example of creating a seed. This example uses a MySQL Dump to seed a table in the project database. The table must be created before seeding. <?php use Illuminate\Database\Seeder; class UserTableSeeder extends Seeder { /** * Run the database seeds. * ...
__sleep and __wakeup are methods that are related to the serialization process. serialize function checks if a class has a __sleep method. If so, it will be executed before any serialization. __sleep is supposed to return an array of the names of all variables of an object that should be serializ...
Take any list and add an identifier to the outer wrapper (ul, div) <ul id="sortable"> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> </ul> In your jquery: $(function(){ $('#sortable').sortable({ ...
__FUNCTION__ returns only the name of the function whereas __METHOD__ returns the name of the class along with the name of the function: <?php class trick { public function doit() { echo __FUNCTION__; } public function doitagain() { echo __METHOD_...
__CLASS__ magic constant returns the same result as get_class() function called without parameters and they both return the name of the class where it was defined (i.e. where you wrote the function call/constant name ). In contrast, get_class($this) and get_called_class() functions call, will both ...
To switch between time zones, you need datetime objects that are timezone-aware. from datetime import datetime from dateutil import tz utc = tz.tzutc() local = tz.tzlocal() utc_now = datetime.utcnow() utc_now # Not timezone-aware. utc_now = utc_now.replace(tzinfo=utc) utc_now # Timezon...
There are multiple threads in your code and you need to safely communicate between them. You can use a Queue from the queue library. from queue import Queue from threading import Thread # create a data producer def producer(output_queue): while True: data = data_computation() ...
This filter is very useful. One of the common problems for developers is how to include templates in plugins they develop. The filter is applied immediately after wordpress locates the appropriate template in the active child/parent theme using the wp hierarchy. Be careful to define when you want ...
Math.random(); produces an evenly distributed random number between 0 (inclusive) and 1 (exclusive) Example output: 0.22282187035307288 0.3948539895936847 0.9987191134132445
function randomMinMax(min:Number, max:Number):Number { return (min + (Math.random() * Math.abs(max - min))); } This function is called by passing a range of minimum and maximum values. Example: randomMinMax(1, 10); Example outputs: 1.661770915146917 2.5521070677787066 9.4362709657...

Page 6 of 54