Tutorial by Examples: l

Swift Function for loading an animation from a file: func animationFromSceneNamed(path: String) -> CAAnimation? { let scene = SCNScene(named: path) var animation:CAAnimation? scene?.rootNode.enumerateChildNodes({ child, stop in if let animKey = child.animationKeys.first...
There are two types of Active Patterns that somewhat differ in usage - Complete and Partial. Complete Active Patterns can be used when you are able to enumerate all the outcomes, like "is a number odd or even?" let (|Odd|Even|) number = if number % 2 = 0 then Even else Odd N...
dblink EXTENSION is a technique to connect another database and make operation of this database so to do that you need: 1-Create a dblink extention: CREATE EXTENSION dblink; 2-Make your operation: For exemple Select some attribute from another table in another database: SELECT * FROM dblink...
When you try to restore database from another server you might get the following error: Error 3154: The backup set holds a backup of a database other than the existing database. In that case you should use WITH REPLACE option to replace database with the database from backup: RESTORE DATABAS...
productFlavors { // Define separate dev and prod product flavors. dev { // dev utilizes minSDKVersion = 21 to allow the Android gradle plugin // to pre-dex each module and produce an APK that can be tested on // Android Lollipop without time c...
To add a JUnit rule to a test fixture: @Rule @JvmField val myRule = TemporaryFolder() The @JvmField annotation is necessary to expose the backing field with the same visibility (public) as the myRule property (see answer). JUnit rules require the annotated rule field to be public.
Prerequisites JDK 1.7 or later installed. You can find the Oracle JDK's here. Steps Download Payara Server Full. Unzip the Payara Server at some location on your computer. We will use C:\payara41 as INSTALL_DIR for Windows users and /payara41 for Linux/Mac users. Starting / stopping Pa...
Let's understand something. JavaEE consists of a number of specifications. When you install an Application Server (Payara for example), you install all of the specifications at once. For example there's a specification for an ORM called JPA (Java Persistence API), a specification to build Component ...
Using the Profiler Class One very good practice is to use Profiler.BeginSample and Profiler.EndSample because it will have its own entry in the Profiler Window. Also, those tag will be stripped out on non-Development build using using ConditionalAttribute, so you don't need to remove them from you...
REPL stands for 'Read Evaluate Print Loop.' The REPL can be used to write and execute code one line at a time and is an alternative to writing code to a file and then compiling or interpreting the entire file before execution. To start the SMLNJ REPL from a command prompt: smluser> sml Standar...
(************************************************* * All comments in SML are block comments * Block Comments begin with '(*' * Block Comments end with '*)' * (* Block Comments can be nested *) * The additional framing asterisks at the beginning * and end of this block comment are common ...
The %>% operator can also be used to pipe the dplyr output into ggplot. This creates a unified exploratory data analysis (EDA) pipeline that is easily customizable. This method is faster than doing the aggregations internally in ggplot and has the added benefit of avoiding unnecessary intermediat...
Assuming you have a handle on the Hibernate Session object, in this case named session: List<Object[]> result = session.createNativeQuery("SELECT * FROM some_table").list(); for (Object[] row : result) { for (Object col : row) { System.out.print(col); } } Thi...
let Source = Folder.Files("\\jsds1.live\dfs\Userprofiles\ixh500\UPM_Profile\desktop\PQ Desktop Demos\Set 2"), #"Lowercased Text" = Table.TransformColumns(Source,{{"Extension", Text.Lower}}), #"Filtered Rows" = Table.SelectRows(#"Lowercased ...
Previous Quarter Sales:=CALCULATE(FactSales[Sales], PREVIOUSQUARTER(DimDate[DateKey])) (Calculates the total sales for the previous quarter, based on the Sales column in the FactSales table and the DateKey in the DimDate table, depending on the filters applied in a PivotTable or PivotChart)
You could migrate from team foundation version control to git by using an open source tool called Git-TF. Migration will also transfer your existing history by converting tfs checkins to git commits. To put your solution into Git by using Git-TF follow these steps: Download Git-TF You can downloa...
This is contrived; but some COBOL programmers may prefer the positive clarity, versus using NOT in conditional expressions (especially with the logic error prone var NOT = value OR other-value). if action-flag = "C" or "R" or "U" or "D" continue else...
program-one. FD important-file. 01 file-record. COPY record-layout. DATA DIVISION. 01 memory-record. COPY record-layout. PROCEDURE DIVISION. ... COPY record-move. ... COPY record-move. program-two. DATA DIVISION. 01 print-record. COPY record-lay...
Swarm Mode Node Availability: Active means that the scheduler can assign tasks to a node. Pause means the scheduler doesn’t assign new tasks to the node, but existing tasks remain running. Drain means the scheduler doesn’t assign new tasks to the node. The scheduler shuts down any existing ta...
Worker Node: #Run the following on the worker node to leave the swarm. docker swarm leave Node left the swarm. If the node has the Manager role, you will get a warning about maintaining the quorum of Managers. You can use --force to leave on the manager node: #Manager Node docker swarm l...

Page 595 of 861