Tutorial by Examples: l

IF THEN ELSE can also be used like a function to return a single value. This is a lot like the ternary ?-operator of C. DEFINE VARIABLE i AS INTEGER NO-UNDO. DEFINE VARIABLE c AS CHARACTER NO-UNDO. /* Set c to "low" if i is less than 5 otherwise set it to "high" c...
The DICOM Image file is a tagged image file; the file contains both an image (most of the time) and a collection of data about the image. The data in a DICOM image file is stored as a sequence of individual elements. Each element contains one item of information about the image or the image itself. ...
Installing Heroku Scheduler heroku addons:create scheduler:standard
Tweepy can be installed from its PyPI repository using pip or easy_install: pip install tweepy or easy_install tweepy You can also download the source from GitHub and install it using setup.py: python setup.py install See the tweepy documentation for more.
Here's a basic example of how to do a very simple class system Class = {} local __instance = {__index=Class} -- Metatable for instances function Class.new() local instance = {} setmetatable(instance, __instance) return instance -- equivalent to: return setmetatable({}, __instance)...
The following code illustrates how to make 'hello world' app in kivy.To run this app in ios and android save it as main.py and use buildozer. from kivy.app import App from kivy.uix.label import Label from kivy.lang import Builder Builder.load_string(''' <SimpleLabel>: text: 'Hello ...
app.module.ts import {routes} from "./app.routes"; @NgModule({ declarations: [AppComponent], imports: [BrowserModule, mainModule.forRoot(), RouterModule.forRoot(routes)], providers: [], bootstrap: [AppComponent] }) export class AppModule { } app.routes.t...
There are 2 ways to set formBuilder controls parameters. On initialize: exampleForm : FormGroup; constructor(fb: FormBuilder){ this.exampleForm = fb.group({ name : new FormControl({value: 'default name'}, Validators.compose([Validators.required, Validators.maxLength(15)])) }); ...
The following is an example of a simple and minimal college database that uses two-way relationships { "students": { "-SL3Cs0KFvDMQLIYZEzv": { "name": "Godric Gryffindor", "id": "900130309", "courses"...
Let's consider the below snippet, Get-ChildItem -Path C:\MyFolder | Select-Object Name, CreationTime, Length It simply output the folder content with the selected properties. Something like, What if I want to display the file size in KB ? This is where calcualted properties comes handy. Get-...
Unlike functions, there's no need to forward declare a procedure. It can be placed anywhere in your code, before or after you call it using RUN. RUN proc. //Procedure starts here PROCEDURE proc: //Procedure ends here END PROCEDURE. The procedure name is folowed by a colon sign telling u...
Set createVBScriptRegExObject = CreateObject("vbscript.RegExp") Tools> References> Microsoft VBScript Regular Expressions #.# Associated DLL: VBScript.dll Source: Internet Explorer 1.0 and 5.5 MSDN-Microsoft Beefs Up VBScript with Regular Expressions MSDN-Regular Expression ...
Incorrect code Sub DoSomething() Dim row As Integer For row = 1 To 100000 'do stuff Next End Sub Why doesn't this work? The Integer data type is a 16-bit signed integer with a maximum value of 32,767; assigning it to anything larger than that will overflow the type and ...
Incorrect code Sub DoSomething() Dim foo As Collection With foo .Add "ABC" .Add "XYZ" End With End Sub Why doesn't this work? Object variables hold a reference, and references need to be set using the Set keyword. This error occurs whenever ...
you can set a Jekyll environment and value, when build time JEKYLL_ENV=production jekyll b JEKYLL_ENV=production jekyll build JEKYLL_ENV=production bundle exec jekyll build if your code contains the bellow snippet, analytics.html will not be included unless your building with JEKYLL_ENV=...
The following code illustrates how to do simple popup with Kivy. from kivy.app import App from kivy.uix.popup import Popup from kivy.lang import Builder from kivy.uix.button import Button Builder.load_string(''' <SimpleButton>: on_press: self.fire_popup() <SimplePopup>: ...
To deploy Java code to AWS Lambda, you have to create a distribution zip file that contains all dependencies that are needed during the runtime. Example project in Gradle: apply plugin: 'java' repositories { mavenCentral() } dependencies { compile 'com.amazonaws:aws-lambda-java-cor...
A lambda needs a handler, which will serve as the entry point to your application. Every handler needs to implement interface RequestHandler<I, O> where I is the input type and O is the output type. The input type is then passed to the handleRequest() method and the method returns the output t...
A lambda needs a handler, which will serve as the entry point to your application. In the simplest case, you get your input from the context and pass the result using the callback() function: exports.handler = (event, context, callback) => { callback(null, 'You sent ' + event.number); };
To create a Java lambda using the GUI, first make sure you have your distribution zip ready. You will also need an AWS account that can create lambdas. Switch to the AWS Lambda, dismiss the introduction screen (or read the Get Started documentation) and press the button Create a Lambda Function. ...

Page 715 of 861