Sometimes you need to create your own Event, one that other plugins can listen to (Vault, among other plugins, does this) and even cancel. Bukkit's Event API allows this to be possible. All you need to do is make a new class, have it extend Event, add the handlers and the attributes your event needs...
# General syntax:
# grep(<pattern>, <character vector>)
mystring <- c('The number 5',
'The number 8',
'1 is the loneliest number',
'Company, 3 is',
'Git SSH tag is [email protected]',
'My personal site is w...
This configuration lets' you run your total spec files in two browser instances in parallel. It helps reduce the overall test execution time. Change the maxInstances based on your need.
Note: Make sure your tests are independent.
var config = {};
var timeout = 120000;
config.framework = 'jasmi...
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...
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...
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...
Sometimes, you need to override one or more attributes of a particular Data Access Class (DAC) field just for a particular screen, without changing the existing behavior for other screens.
Replacing All Attributes
Suppose the original DAC field attributes are declared as shown below:
public class...
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 ...
In order to display a gif, you need to show it frame by frame sort of like an animation.
An animated gif consists of a number of frames in a single file. Tk loads the first frame but you can specify different frames by passing an index parameter when creating the image. For example:
frame2 = Photo...
Tasks in configuration
All attributes of grunt.initConfig are valid tasks, so if your Gruntfile looks like this:
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
files: ['Gruntfile.js'],
}
});
grunt.loadNpmTasks('grunt-contrib-jshint...
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...