Tutorial by Examples: is

Monthwise difference between two dates(timestamp) select ( (DATE_PART('year', AgeonDate) - DATE_PART('year', tmpdate)) * 12 + (DATE_PART('month', AgeonDate) - DATE_PART('month', tmpdate)) ) from dbo."Table1" Yearwise difference between two dates...
The following table compares the features available(1) in EF Core and EF6.x. It is intended to give a high level comparison and does not list every feature, or attempt to give details on possible differences between how the same feature works. Creating a ModelEF6.xEF Core 1.0.0Basic modelling (cla...
<?php if( get_field('my_field_name') ){ ?> <?php echo get_field('my_field_name'); ?> <?php }; ?> This will only show the field if content exists depending on content type (i.e., an image is uploaded to the field, text is entered, it is selected, etc.).
A very useful and logical follow-up to histograms and density plots would be the Empirical Cumulative Distribution Function. We can use the function ecdf() for this purpose. A basic plot produced by the command plot(ecdf(rnorm(100)),main="Cumulative distribution",xlab="x") wo...
<?php if( get_field('text_field') ): ?> <?php the_field('text_field'); ?> <?php endif; ?> Here we use get_field() to determine if a value exists, and the_field() to echo it.
In a test you can disable animations by adding in setUp: app.launchEnvironment = ["animations": "0"] Where app is instance of XCUIApplication.
Aliases are named shortcuts of commands, one can define and use in interactive bash instances. They are held in an associative array named BASH_ALIASES. To use this var in a script, it must be run within an interactive shell #!/bin/bash -li # note the -li above! -l makes this behave like a login s...
def createDissolvedGDB(workspace, gdbName): gdb_name = workspace + "/" + gdbName + ".gdb" if(arcpy.Exists(gdb_name): arcpy.Delete_management(gdb_name) arcpy.CreateFileGDB_management(workspace, gdbName, "") else: arcpy.CreateFi...
When in the SBT console, to list all definable settings for a project: settings Or, to get a subproject's (for example, named webapp) settings: project webapp settings The first line above navigates into the specific subproject. To show the value of a specific setting (for instance, organi...
The following command lists out the queries that are currently being run on the server db.currentOp() The output looks something similar to this { "inprog" : [ { "opid" : "302616759", "active" : true, &...
PermissionUtil is a simple and convenient way of asking for permissions in context. You can easily provide what should happen in case of all requested permissions granted (onAllGranted()), any request was denied (onAnyDenied()) or in case that a rational is needed (onRational()). Anywhere in your A...
Open Jenkins default config file and add in JAVA_ARGS next key -Djenkins.install.runSetupWizard=false In Ubuntu 16 default file places in /etc/default/jenkins Create groovy file by path $JENKINS_HOME/init.groovy.d/basic-security.groovy In Ubuntu 16 Jenkins home directory places in /var/li...
Team Foundation Server (commonly abbreviated to TFS) is a Microsoft product that provides source code management (either via Team Foundation Version Control or Git), reporting, requirements management, project management (for both agile software development and waterfall teams), automated builds and...
Often when using a callback you want access to a specific context. function SomeClass(msg, elem) { this.msg = msg; elem.addEventListener('click', function() { console.log(this.msg); // <= will fail because "this" is undefined }); } var s = new SomeClass("hello&q...
The file editor that ships with WordPress is a security risk. If an attacker gains admin access to your WordPress website they will be easily able to insert malicious code into theme and plugin files. It is also a risk with clients who don't know what they're doing. Once misplaced colon in the file ...
Here is the default flow of registering a user in Web API. All of these routes can be found in the AccountController: The user requests a list of the login providers using the GetExternalLogins route, passing a return URL as a parameter. This returns an array of provider objects, containing t...
app.module.ts Add these into your app.module.ts file to use reactive forms import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { AppComponent } from './app.comp...
This example will list the preferred resolution for all the connected monitors. The Code: On Error Resume Next strComputer = "." strQuery = "SELECT PreferredMonitorSourceModeIndex, MonitorSourceModes " & _ "FROM WmiMonitorListedSupportedSourceModes" ...
Strings can be compared with the == operator in Julia, but this is sensitive to differences in case. For instance, "Hello" and "hello" are considered different strings. julia> "Hello" == "Hello" true julia> "Hello" == "hello" fa...
Sometimes, one wants strings like "resume" and "résumé" to compare equal. That is, graphemes that share a basic glyph, but possibly differ because of additions to those basic glyphs. Such comparison can be accomplished by stripping diacritical marks. equals_ignore_mark(s, t) =...

Page 79 of 109