Tutorial by Examples: l

var config = {}; var timeout = 120000; config.framework = 'jasmine2'; config.allScriptsTimeout = timeout; config.getPageTimeout = timeout; config.jasmineNodeOpts.isVerbose = true; config.jasmineNodeOpts.defaultTimeoutInterval = timeout; config.specs = ['qa/**/*Spec.js']; config.multiCapabi...
In this example 2000 bytes will be transfered using DMA, Transmit Half Complete and Transmit Complete interrupts achieving the best performance. The first half of the transmit buffer is loaded with new data by the CPU in the Transmit Half Complete interrupt callback while the second half of the buf...
Tkinter support .ppm files from PIL(Python Imaging Library), .JPG, .PNG and .GIF. To import and image you first need to create a reference like so: Image = PhotoImage(filename = [Your Image here]) Now, we can add this image to Button and Labels like so using the "img" callback: Lbl ...
In an angular app everything goes around scope, if we could get an elements scope then it is easy to debug the angular app. How to access the scope of element: angular.element(myDomElement).scope(); e.g. angular.element(document.getElementById('yourElementId')).scope() //accessing by ID Gett...
First we need a class that represents the block public class CustomBlock extends Block { public CustomBlock () { super(Material.ROCK); setHardness(1.0f); setHarvestLevel("pickaxe", 0); setResistance(1.0f); setCreativeTab(CreativeTabs.DEC...
Next we need to tell Minecraft what we want our block to look like. { "parent": "block/cube_all", "textures": { "all": "example:blocks/decorative" } } That's pretty much all that's needed for it to work once the block is ...
Registering blocks is done from your main mod class, or a ModBlocks class method invoked from the main mod class during preInit. Block myBlock = new CustomBlock(); string registryname = "my_block"; block.setRegistryName(registryname); block.setUnlocalizedName(block.getRegistryName().to...
One of several applications of bit manipulation is converting a letter from small to capital or vice versa by choosing a mask and a proper bit operation. For example, the a letter has this binary representation 01(1)00001 while its capital counterpart has 01(0)00001. They differ solely in the bit in...
#include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc.hpp> // drawing shapes #include <iostream> int main( int argc, char** argv ) { // First create a black image. cv::Mat image(500,500, CV_8UC3, cv::Scalar(0,0,0...
Create a file called hello.html with the following content: <!doctype html> <html> <head> <script src="//cdnjs.cloudflare.com/ajax/libs/dygraph/2.0.0/dygraph.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com...
from kivy.app import App from kivy.lang import Builder from kivy.uix.button import Button items = [ {"color":(1, 1, 1, 1), "font_size": "20sp", "text": "white", "input_data": ["some","random","data&q...
ecosystem.json { "name": "app-name", "script": "server", "exec_mode": "cluster", "instances": 0, "wait_ready": true "listen_timeout": 10000, "kill_timeout": 500...
Each standard Oracle error is associated with an error number. It's important to anticipate what could go wrong in your code. Here for a connection to another database, it can be: -28000 account is locked -28001 password expired -28002 grace period -1017 wrong user / password Here is a way ...
Vim is (like GNU Nano or GNU emacs) lightweight. It does not need any kind of graphical interface (like x11, wayland &co). This makes vim to a system maintainers best friend. You can use it using ssh and, this is really important, on really small devices that do not have some kind of graphical ...
When you add entries to an xml or copy from other sources, there often tends to be uneven tabs and spaces around the entries. When you press Ctrl + Shift + F, you easily align the entire document and remove the extra tabs as well. Thus the text gets formatted and eventually becomes readable.
Dim lo as ListObject Dim MyRange as Range Set lo = Sheet1.ListObjects(1) 'or Set lo = Sheet1.ListObjects("Table1") 'or Set lo = MyRange.ListObject
Dim lo as ListObject Dim lr as ListRow Dim lc as ListColumn Set lr = lo.ListRows.Add Set lr = lo.ListRows(5) For Each lr in lo.ListRows lr.Range.ClearContents lr.Range(1, lo.ListColumns("Some Column").Index).Value = 8 Next Set lc = lo.ListColumns.Add Set lc = lo.Lis...
Dim lo as ListObject Set lo = Sheet1.ListObjects("Table1") lo.Unlist
You can un-register individual events, entire listener classes or all events registered by your plugin or even by other plugins! Un-register specific event Each event class has the getHandlerList() static method, call that and then you can use .unregister() method. PlayerInteractEvent.getHandlerL...
This example is a quick setup of Angular and how to generate a quick example project. Prerequisites: Node.js 6.9.0 or greater. npm v3 or greater or yarn. Typings v1 or greater. Open a terminal and run the commands one by one: npm install -g typings or yarn global add typings npm install -...

Page 787 of 861