Tutorial by Examples: c

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...
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 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...
/* save the file in 'pages/loginPage' var LoginPage = function(){ }; /*Application object properties*/ LoginPage.prototype = Object.create({}, { userName: { get: function() { return browser.driver.findElement(By.id('userid')); } }, userPass: { ...
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...
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...
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...
To illustrate this, here is a function that has 3 different "wrong" behaviors the parameter is completely stupid: we use a user-defined expression the parameter has a typo: we use Oracle standard NO_DATA_FOUND error another, but not handled case Feel free to adapt it to your standa...
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 ...
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
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 -...
This example shows how to set Click EventHandlers in a Xamarin.Android RecyclerView. In Android Java, the way to set up a listener for a Click is using a onClickListener for the view that will be clicked, like this: ImageView picture = findViewById(R.id.item_picture); picture.setOnClickListener(n...
The idea behind the AdhocWorkspace is to create a workspace on the fly. var workspace = new AdhocWorkspace(); string projectName = "HelloWorldProject"; ProjectId projectId = ProjectId.CreateNewId(); VersionStamp versionStamp = VersionStamp.Create(); ProjectInfo helloWorldProject = P...
The MSBuildWorspace is built around the concept of handling MSBuild solutions (.sln files) and their respective projects (.csproj, .vbproj). Adding new projects and documents to this workspace is not supported. string solutionPath = @"C:\Path\To\Solution\Sample.sln"; MSBuildWorkspace ...
In contrast to the other types of workspaces, the VisualStudioWorkspace, cannot be created manually. It can be accessed when building a Visual Studio extension. When inside your extension package project, go to [YourVSPackage]Package.cs file. There you can acquire the workspace in two ways: protec...

Page 758 of 826