Hello Swift

Let’s do a typical Hello World example in Swift. I have Xcode installed, so I can invoke a swift environment using xcrun, a command to start an interactive Xcode environment and then defining swift as the language I want to use, as follows using a standard Mac terminal session: $xcrun swift Then I get a welcome screen, which is kind: Welcome to Apple Swift version 2.1.1 (swiftlang-700.1.101.15 clang-700.1.81). Type :help for assistance. Then, I can throw some string into a variable: 1> let mystring = "Hello Swift" And I get a response that the string was accepted, as a string: mastering: String = "Hello Swift" Then I can just echo that string out, popping it into a quoted and parenthetical (since it has a variable inside it, made regular by the \): 2> print ("mystring is \(mystring).") And I get the following response: mastering is Hello Swift. Pretty simple syntax. We can also use two strings and then use the + operator to concatenate (a typical programming task): let firstword = "Hello" let secondword = "Swift" let mystring = firstword + secondword print ("mystring is \(mystring).") Now that the basics are out of the way, why not build a Swift API…

Using the ExtremeZ-IP Command Line

When you are configuring ExtremeZ-IP as a print server, you will need to set up and configure each printer. However, if you already have setup and configured printer queues for the Windows server, you can import existing queues into ExtremeZ-IP. This can be done programatically via the ExtremeZ-IP EZIPUTIL command line tool. EZIPUTIL has a number of options, whereby the SERVER option is used to configure global settings for ExtremeZ-IP, VOLUME is used to create, edit and delete print queues and PRINT is used to manage shared print queues. Each of the options also has a number of switches for the feature(s) that are being managed. These are structured as standard switches that are used in Windows batch scripting. The /IMPORT switch can be used to import print queues. By defining the WINDOWS setting for the import, you will recreate all printer queues from Windows. This command would look like the following: EZIPUTIL PRINT /IMPORT:WINDOWS Once the command has been completed, you can then list printer queues using the /LIST switch: EZIPUTIL PRINT /LIST Once you have created printer queues you will often end up needing to remove a queue or three. To remove a printer queue, you will use the /REMOVE switch along with a /NAME switch to specify the printer queue that you are removing. For example, to remove a queue called Accounting_499 you would use the following command: EZIPUTIL PRINT /REMOVE /NAME:Accounting_499 The VOLUME option has a similar feature in the /REPLICATE_SMB switch, which allows you to replicate existing SMB/CIFS shares: EZIPUTIL VOLUME /REPLICATE_SMB The /REMOVE switch can also be used with the VOLUME option. If you have created volumes you can also remove those from the command line. For example, to remove a shared volume called Accounting_Files, you would use the following command: EZIPUTIL VOLUME /REMOVE /NAME:Accounting_Files