Tutorial by Examples: and

The Replace function in SQL is used to update the content of a string. The function call is REPLACE( ) for MySQL, Oracle, and SQL Server. The syntax of the Replace function is: REPLACE (str, find, repl) The following example replaces occurrences of South with Southern in Employees table: FirstN...
To break loops, the command EXIT can be used. DO. READ TABLE itab INDEX sy-index INTO DATA(wa). IF sy-subrc <> 0. EXIT. "Stop this loop if no element was found ENDIF. " some code ENDDO. To skip to the next loop step, the command CONTINUE can be u...
Enable and configure the experimental Gradle plugin to improve AndroidStudio's NDK support. Check that you fulfill the following requirements: Gradle 2.10 (for this example) Android NDK r10 or later Android SDK with build tools v19.0.0 or later Configure MyApp/build.gradle file Edit the dep...
When to use abstract classes: To implement the same or different behaviour among multiple related objects When to use interfaces: to implement a contract by multiple unrelated objects Abstract classes create "is a" relations while interfaces provide "has a" capability. This c...
sudo apt-add-repository ppa:brightbox/ruby-ng Hit Enter to confirm sudo apt-get update Then you can install your ruby version of choice (the ppa supports ruby2.0 ruby2.1 ruby2.2 ruby2.3 and legacy versions ruby1.8 ruby1.9.1) Don't forget to include the respective -dev package for your version. Ot...
uses SysUtils; var S1, S2: string; begin S1 := 'Foo'; S2 := LowerCase(S1); // S2 := 'foo'; S1 := UpperCase(S2); // S1 := 'FOO';
The dimension attribute on an object specifies that that object is an array. There are, in Fortran 2008, five array natures:1 explicit shape assumed shape assumed size deferred shape implied shape Take the three rank-1 arrays2 integer a, b, c dimension(5) a ! Explicit shape (default ...
(This is a request for a good example that shows how to construct a SELECT using CONCAT, then prepare+execute it. Please emphasize the use of @variables versus DECLAREd variables -- it makes a big difference, and it is something that novices (include myself) stumble over.)
When expecting someone to reproduce an R code that has random elements in it, the set.seed() function becomes very handy. For example, these two lines will always produce different output (because that is the whole point of random number generators): > sample(1:10,5) [1] 6 9 2 7 10 >...
The DATE data type does not handle time zones or changes in daylight savings time. Either: use the TIMESTAMP WITH TIME ZONE data type; or handle the changes in your application logic. A DATE can be stored as Coordinated Universal Time (UTC) and converted to the current session time zone like...
Command line arguments parsing is Go is very similar to other languages. In you code you just access slice of arguments where first argument will be the name of program itself. Quick example: package main import ( "fmt" "os" ) func main() { progName := o...
Throughout the topics and examples here we'll see many declarations of variables, functions and so on. As well as their name, data objects may have attributes. Covered in this topic are declaration statements like integer, parameter :: single_kind = kind(1.) which gives the object single_kind...
Using the document-ready event can have small performance drawbacks, with delayed execution of up to ~300ms. Sometimes the same behavior can be achieved by execution of code just before the closing </body> tag: <body> <span id="greeting"></span> world! <sc...
tree = log --oneline --decorate --source --pretty=format:'"%Cblue %h %Cgreen %ar %Cblue %an %C(yellow) %d %Creset %s"' --all --graph example * 40554ac 3 months ago Alexander Zolotov Merge pull request #95 from gmandnepr/external_plugins |\ | * e509f61 3 months ago Ievg...
Express is based on Connect, which is what provides the middleware functionality of Express. To understand what connect is, you can see that it provides the basic app structure that you use when you use express const connect = require('connect') const app = connect() app.listen(3000) This wi...
If we would like to limit the access to our app, we could write a middleware for that too! This example only grants you access on thrusdays, but a real world example could, for example, be user authentication. A good place to put this would be after the logging middleware but before any content is s...
Goto https://atom.io/ and install the atom editor. Then install some Atom packages for easier Titanium coding: NameTypeFeaturestitanium language javascriptLanguageJS Autocomplete (non alloy)Titanium Alloyadd-onAll-in-one packageJump to definitionOpen relatedTSS HighlightTi-Createadd-onCreate proje...
Messages can be sent from JavaScript using the following code window.webkit.messageHandlers.{NAME}.postMessage() Here how to create a script message handler to handle the messages: class NotificationScriptMessageHandler: NSObject, WKScriptMessageHandler { func userContentController(userCon...
function DriveAppAddFile(child) {//Adds file to the root drive in Google Drive var body,returnedFolder;//Declare variable names if (!child) { body = "There is no file"; MailApp.sendEmail(Session.getEffectiveUser().getEmail(), "", "Error Adding File!",...
In ASP.NET Core apps, you bundle and minify the client-side resources during design-time using third party tools, such as Gulp and Grunt. By using design-time bundling and minification, the minified files are created prior to the application’s deployment. Bundling and minifying before deployment p...

Page 60 of 153