Tutorial by Examples: e

Buy Minecraft from here Create a Mojang account or sign in if you already have one. If you created a new account, verify your email. Fill in your Payment Details. Make sure your on minecraft.net and you're on a secure connection (HTTPS) Download and Run Minecraft Open th...
By default, the scope is public, the value can be accessed from anywhere. package com.example { class FooClass { val x = "foo" } } package an.other.package { class BarClass { val foo = new com.example.FooClass foo.x // <- Accessing a public value from anothe...
When the scope is private, it can only be accessed from the current class or other instances of the current class. package com.example { class FooClass { private val x = "foo" def aFoo(otherFoo: FooClass) { otherFoo.x // <- Accessing from another instance of the sam...
You can specify a package where the private value can be accessed. package com.example { class FooClass { private val x = "foo" private[example] val y = "bar" } class BarClass { val f = new FooClass f.x // <- Will not compile f.y // <- Wil...
The most restrictive scope is "object-private" scope, which only allows that value to be accessed from the same instance of the object. class FooClass { private[this] val x = "foo" def aFoo(otherFoo: FooClass) = { otherFoo.x // <- This will not compile, accessing x...
The protected scope allows the value to be accessed from any subclasses of the current class. class FooClass { protected val x = "foo" } class BarClass extends FooClass { val y = x // It is a subclass instance, will compile } class ClassB { val f = new FooClass f.x // <...
The package protected scope allows the value to be accessed only from any subclass in a specific package. package com.example { class FooClass { protected[example] val x = "foo" } class ClassB extends FooClass { val y = x // It's in the protected scope, will compile ...
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...
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...
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...
import wx class MyTextDropTarget(wx.TextDropTarget): def __init__(self, textctrl): wx.TextDropTarget.__init__(self) self.textctrl = textctrl def OnDropText(self, x, y, text): self.textctrl.WriteText("(%d, %d)\n%s\n" % (x, y, text)) ret...
import wx class MyURLDropTarget(wx.PyDropTarget): def __init__(self, window): wx.PyDropTarget.__init__(self) self.window = window self.data = wx.URLDataObject(); self.SetDataObject(self.data) def OnDragOver(self, x, y, d): return wx....
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...

Page 1084 of 1191