Tutorial by Examples: l

The following Less: .paragraph{ font-size: 12px; color: blue; background: white; } .parent{ font-size: 14px; color: black; background: green; .nestedParagraph:extend(.paragraph){ } } will compile into the following css: .paragraph, .parent .nestedParagraph { ...
The following Less .paragraph{ font-size: 12px; color: darkgrey; background: white; } .special-paragraph{ font-size: 24px; font-weight: bold; color: black; } .parent{ background: lightgrey; .nestedParagraph{ &:extend(.paragraph); &:extend(.special-p...
You may also extend nested selectors. The below Less .otherChild{ color: blue; } .otherParent{ color: red; .otherChild{ font-size: 12px; color: green; } } .parent{ .nestedParagraph{ &:extend(.otherParent .otherChild); } } Will compile to .otherChild...
The following Less div.paragraph{ color: blue; } *.paragraph{ color: green; } .otherClass.paragraph{ color: red; } .paragraph.otherClass{ color: darkgrey; } .parent{ .nestedParagraph{ &:extend(.paragraph); } } Will compile into div.paragraph { colo...
In this example the microcontroller echos back the received bytes to the sender using UART RX interrupt. #include "stm32f4xx.h" UART_HandleTypeDef huart2; /* Single byte to store input */ uint8_t byte; void SystemClock_Config(void); /* UART2 Interrupt Service Routine */ void...
The following Less .addDivider::before{ content: ""; height: 80%; background: white; width: 1px; position: absolute; top: 10%; left: 0; } .nav-bar{ background: black; display: flex; flex-direction: row; width: 400px; .nav-item{ color: white...
In the code below you can see how to add a command to your plugin. MainClass.java package yourpackage; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.plugin.java.JavaPlugin; public class MainClass extends JavaPlugin { @Override public bool...
import wx class MyFileDropTarget(wx.FileDropTarget): """""" def __init__(self, window): """Constructor""" wx.FileDropTarget.__init__(self) self.window = window def OnDropFiles(self, x, y, f...
By default, NuGet restores packages into the packages folder in the solution root. This folder is shared between all solution projects. In some cases it is useful to change the location of the restored packages (for instance, to share them between several solutions). Its can be achieved by creating...
For all my projects, Django-Allauth remained one that is easy to setup, and comes out of the box with many features including but not limited to: Some 50+ social networks authentications Mix signup of both local and social accounts Multiple social accounts Optional instant-signup for social ac...
Add the slf4j dependency to your pom.xml: <properties> <slf4j.version>1.7.21</slf4j.version> </properties> <!-- ... --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version&gt...
Local mode In local mode, for example when running your application from an IDE, you can configure log4j as usual, i.e. by making a log4j.properties available in the classpath. An easy way in maven is to create log4j.properties in the src/main/resources folder. Here is an example: log4j.rootLogger...
In case you need different settings for your various applications, there is (as of Flink 1.2) no easy way to do that. If you use the one-yarn-cluster-per-job mode of flink (i.e. you launch your scripts with: flink run -m yarn-cluster ...), here is a workaround : create a conf directory somewhe...
Yarn does not by default aggregate logs before an application finishes, which can be problematic with streaming jobs that don't even terminate. A workaround is to use rsyslog, which is available on most linux machines. First, allow incoming udp requests by uncommenting the following lines in /etc/...
There are a variety of ways to validate parameter entry, in PowerShell. Instead of writing code within functions or scripts to validate parameter values, these ParameterAttributes will throw if invalid values are passed. ValidateSet Sometimes we need to restrict the possible values that a paramet...
// Fetches the value of $_GET['id'] and returns 0 if it does not exist. $id = $_GET['id'] ?? 0; // This is equivalent to: $id = isset($_GET['id']) ? $_GET['id'] : 0; // Coalescing can be chained: this will return the first defined value out of // $_GET['id'], $_POST['id'], and 0. $id = $_GE...
Sometimes you want to switch off all previously registered listeners. //Adding a normal click handler $(document).on("click",function(){ console.log("Document Clicked 1") }); //Adding another click handler $(document).on("click",function(){ console.log(&q...
Note: The Redis project does not officially support Windows. However, the Microsoft Open Tech group develops and maintains this Windows port targeting Win64. Official redis.io/download You can choose to download different versions or the latest version of Redis github.com/MSOpenTech/redis/release...
Generic example in a form of $a <=> $b matrix. 0 <=> 1; // -1 (left operand less than right, right is greater) 0 <=> 0; // 0 (operands are equal) 1 <=> 0; // 1 (left operand greater than right, left is greater) 1 <=> 1; // 0 (operands are equal) ╔═══════╦════╦═...
$array = [1, 0, 5, 9, 3, 7, 6, 8, 4, 2]; usort($array, function (int $a, int $b): int { return $a <=> $b; }); print_r($array); Array ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 [6] => 6 [7] => 7 [8...

Page 784 of 861