Tutorial by Examples: amp

Example: s = "Hello" # s is a string Then we find out something about s. Lets begin: So you want to know what is the class of s at run time? irb(main):055:0* s.class => String Ohh, good. But what are the methods of s? irb(main):002:0> s.methods => [:unicode_normalize,...
In order to create an use a custome tag,we need to follow couple of steps: Create a tag file,defining the attributes used by it and any variables which will be used by the tag a. The attributes need to have a name,their type and and required field with a boolean value b. The variables will be...
Environment Setup: Download android sdk of API level 17 or more Node.js (https://nodejs.org/) Appium software (http://appium.io/) Selenium jars (http://www.seleniumhq.org/download/) Appium jar (https://search.maven.org/#search%7Cga%7C1%7Cg%3Aio.appium%20a%3Ajava-client) .apk file of the appl...
' How To Seek Past VBA's 2GB File Limit ' Source: https://support.microsoft.com/en-us/kb/189981 (Archived) ' This must be in a Class Module Option Explicit Public Enum W32F_Errors W32F_UNKNOWN_ERROR = 45600 W32F_FILE_ALREADY_OPEN W32F_PROBLEM_OPENING_FILE W32F_FILE_ALREAD...
Let's say we have the following 4 by 4 grid: Let's assume that this is a maze. There are no walls/obstacles, though. We only have a starting point (the green square), and an ending point (the red square). Let's also assume that in order to get from green to red, we cannot move diagonally. So, s...
In tables recording events there is often a datetime field recording the time an event happened. Finding the single most recent event can be difficult because it's always possible that two events were recorded with exactly identical timestamps. You can use row_number() over (order by ...) to make su...
var passport = require('passport'); var LocalStrategy = require('passport-local').Strategy; passport.serializeUser(function(user, done) { //In serialize user you decide what to store in the session. Here I'm storing the user id only. done(null, user.id); }); passport.deserializeUser(funct...
Question: What is the output of code below and why? setTimeout(function() { console.log("A"); }, 1000); setTimeout(function() { console.log("B"); }, 0); getDataFromDatabase(function(err, data) { console.log("C"); setTimeout(function() { ...
Example Data Please try to provide a minimal example input data in a format that can be directly used by the answers without tedious and time consuming parsing for example input file or local collection with all code required to create distributed data structures. When applicable always include ty...
Setup Steps: Download and install jdk8. Add the following to your project’s main build.gradle buildscript { repositories { mavenCentral() } dependencies { classpath 'me.tatarka:gradle-retrolambda:3.2.3' } } Now add this to your application m...
class Person { String name; public Person(String name) { this.name = name; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Person person = (Person) ...
If you load your fit parameters from a file, you should declare in it all the parameters you're going to use and, when needed, initialise them. ## Start parameters for the fit of data.dat m = -0.0005 q = -0.0005 d = 1.02 Tc = 45.0 g_d = 1.0 b = 0.0100...
The abstract class IntentService is a base class for services, which run in the background without any user interface. Therefore, in order to update the UI, we have to make use of a receiver, which may be either a BroadcastReceiver or a ResultReceiver: A BroadcastReceiver should be used if your s...
If you would like to get base project with methods described below you can download Xamarin.Android application template from my GitHub. You can find examples for: Application lifecycle methods Activity lifecycle methods Fragment lifecycle methods https://github.com/Daniel-Krzyczkowski/Xamar...
This method allows non-implementation-specific code to be written and deployed across multiple jms platforms. Below basic example connects to activemq jms server and sends a message. import java.util.Properties; import javax.jms.JMSException; import javax.jms.Queue; import javax.jms.QueueConne...
The source code can be cloned or downloaded from GitHub to test it. node('iOS Node') { stage('Checkout/Build/Test') { // Checkout files. checkout([ $class: 'GitSCM', branches: [[name: 'master']], doGenerateSubmoduleConfigurations: fa...
A keyword is "MONARCHY" then the matrix will look like The matrix is constructed by filling in the letters of the keyword (minus duplicates) from left to right and from top to bottom, and then filling in the remainder of the matrix with the remaining letters in alphabetic order. Plai...
<script src="https://apis.google.com/js/api.js"></script> <script> function start() { // 2. Initialize the JavaScript client library. gapi.client.init({ 'apiKey': 'YOUR_API_KEY', // clientId and scope are optional if auth is not required. 'clientId': 'YOUR_WEB_CL...
Better MID() and other string extraction examples, currently lacking from the web. Please help me make a good example, or complete this one here. Something like this: DIM strEmpty as String, strNull as String, theText as String DIM idx as Integer DIM letterCount as Integer DIM result as String ...
Here, a cursor is used to loop through all databases. Futhermore, a cursor from dynamic sql is used to query each database returned by the first cursor. This is to demonstrate the connection-scope of a cursor. DECLARE @db_name nvarchar(255) DECLARE @sql nvarchar(MAX) DECLARE @schema nvarcha...

Page 33 of 46