Tutorial by Examples: c

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...
You can establish a transaction by calling the pipeline method on the StrictRedis. Redis commands executed against the transaction are performed in a single block. # defaults to transaction=True tx = r.pipeline() tx.hincrbyfloat(debit_account_key, 'balance', -amount) tx.hincrbyfloat(credit_acc...
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...
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...
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...
Add gem 'figaro' to your Gemfile and run bundle install. Then run bundle exec figaro install; this will create config/application.yml and add it to your .gitignore file, preventing it from being added to version control. You can store your keys in application.yml in this format: SECRET_NAME: secre...
Using a Pool Most code will want to connect to Redis using a pool of shared connection objects. Connecting to Redis using a pool involves two different code block. At initialization time, your application needs to create the connection pool: JedisPoolConfig poolCfg = new JedisPoolConfig(); ...
Once you have established a connection to Redis you can get and set values using the Jedis connection object: Get String value = jedis.get(myKey); Set jedis.put(myKey, "some value");
CentOS versions 2 - 5 CentOS version 7 CentOS 7 is fully based on RedHat the detail documentation, examples and system administration guides are located here:CentOS 7 full documention
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...
Get-User() Use Verb-Noun pattern while naming a function. Verb implies an action e.g. Get, Set, New, Read, Write and many more. See approved verbs. Noun should be singular even if it acts on multiple items. Get-User() may return one or multiple users. Use Pascal case for both Verb and Noun. ...
It's possible to specify several type constraints for generics using the where clause: func doSomething<T where T: Comparable, T: Hashable>(first: T, second: T) { // Access hashable function guard first.hashValue == second.hashValue else { return } // Access compa...
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...
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) ╔═══════╦════╦═...
GeneralDescriptionCTRL + `Show Hide ConsoleCTRL + K or CTRL + BShow/Hide SidebarCTRL + SHIFT + PCommand PalletteCTRL + SPACESelect 'autocomplete' suggestionCTRL + YRedo last keyboard shortcutSelecting TextShortcut ActionCTRL + DSelects a word/ used for 'select next iteration'CTRL + UDeselect next it...
<!doctype html> <html> <head> <title>Page Title</title> <meta charset="UTF-8"> <meta name="viewport" content="initial-scale=1.0"> <script src="vue.js"></script> <style> ...
<!doctype html> <html> <head> <title>Page Title</title> <meta charset="UTF-8"> <meta name="viewport" content="initial-scale=1.0"> <script src="vue.js"></script> <style> ...

Page 755 of 826