Tutorial by Examples: case

The CASE-statement is a lot more strict than the IF/ELSE-conditional. It can only compare a single variable and only equality, not larget/smaller than etc. DEFINE VARIABLE c AS CHARACTER NO-UNDO. CASE c: WHEN "A" THEN DO: RUN procedureA. END. WHEN "B" ...
The traditional technique to make sort ignore case is to pass strings to lc or uc for comparison: @sorted = sort { lc($a) cmp lc($b) } @list; This works on all versions of Perl 5 and is completely sufficient for English; it doesn't matter whether you use uc or lc. However, it presents a problem ...
Deconstructing the use of an unsafe pointer in the Swift library method; public init?(validatingUTF8 cString: UnsafePointer<CChar>) Purpose: Creates a new string by copying and validating the null-terminated UTF-8 data referenced by the given pointer. This initializer does not try to rep...
package main import ( "k8s.io/kubernetes/pkg/api" unver "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/restclient" client "k8s.io/kubernetes/pkg/client/unversioned&...
package main import ( //"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/restclient" "log" "os" // unver "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/extensions" client &...
class MainMenuListView; class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(QWidget* parent = 0); ~MainWindow(); private: MainMenuListView* menuA; MainMenuListView* menuB; MainMenuListView* menuC; };
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { QWidget* w = new QWidget(this); QHBoxLayout* hbox = new QHBoxLayout(); QVBoxLayout* vBox = new QVBoxLayout(); menuA = new MainMenuListView(w, "Images"); menuB = new MainMenuListView(w, "Video...
Here is a sample output: As you can seen above, it can be useful for creating stacked menus. Note that this sample is trivial. The two widgets have the same size constraints.
Lets take fb login as testcase,will see how to capture and export as JAVA class Click on the selenium IDE icon on top right corner of your browser Enter the url https://facebook.com Click on Record button , as shown in the screenshot Export the usecase as java file Save the file in you lo...
Create the Root Certificate The Root Certificate (aka CA File) will be used to sign and identify your certificate. To generate it, run the command below. openssl req -nodes -out ca.pem -new -x509 -keyout ca.key Keep the root certificate and its key carefully, both will be used to sign your cert...
No Mutual SSL In this example, we might use the CA File (ca.pem) that you generated during the "How to configure a ReplicaSet to support TLS/SSL?" section. We will assume that the CA file is located in your current folder. We will assume that your 3 nodes are running on mongo1:27017, mon...
In a Searched Case statement, each option can test one or more values independently. The code below is an example of a searched case statement: DECLARE @FirstName varchar(30) = 'John' DECLARE @LastName varchar(30) = 'Smith' SELECT CASE WHEN LEFT(@FirstName, 1) IN ('a','e','i','o','u') ...
To fetch large data we can use generators in pandas and load data in chunks. import pandas as pd from sqlalchemy import create_engine from sqlalchemy.engine.url import URL # sqlalchemy engine engine = create_engine(URL( drivername="mysql" username="user", ...
Dim number As Integer = 8 Select Case number Case 1 To 5 Debug.WriteLine("Between 1 and 5, inclusive") ' The following is the only Case clause that evaluates to True. Case 6, 7, 8 Debug.WriteLine("Between 6 and 8, inclu...
Now we will apply a strided convolution to our previously described padded example and calculate the convolution where p = 1, s = 2 Previously when we used strides = 1, our slided window moved by 1 position, with strides = s it moves by s positions (you need to calculate s^2 elements less. But in...
Imagine that you need sort records by lowest value of either one of two columns. Some databases could use a non-aggregated MIN() or LEAST() function for this (... ORDER BY MIN(Date1, Date2)), but in standard SQL, you have to use a CASE expression. The CASE expression in the query below looks at th...
Essence of searching lies in its order. Everyone wants search results to be shown in such a way that best suited results are shown on top. Relational database do not have such capability. Elasticsearch on the other hand shows results on the basis of relevancy by default. Setup Same as used in ...
Sometimes, we may need to ignore the case of our query, with respect to the match in the document. An analyzer can be used in this case to ignore the case while searching. Each field will have to contain this analyzer in it's property, in order to work: "settings": { "analys...
Vim saves all your unsaved edits in a swap file, an extra file that gets deleted once the changes are committed by saving. The name of the swap file is usually the name of the file being edited preceded by a . and with a .swp suffix (you can see it with :sw). So in case your vim process terminates ...
MOVE FUNCTION UPPER-CASE("Hello World!") TO SOME-FIELD DISPLAY SOME-FIELD Output HELLO WORLD!

Page 7 of 8