Tutorial by Examples: c

$username = 'user' $password= 'password' $DESTINATION = "D:\test\latest.tar.gz" $client = New-Object System.Net.WebClient $client.Credentials = new-object System.Net.NetworkCredential($username, $password) $lastModifiedResponse = $client.DownloadString('https://domain.org.com/artifact...
Here I am presenting how to create first basic program in Swift 3 language. First you need to have any basic programming language knowledge or not having then be ready to learn it from beginning. Requirements for developments: MAC OS - Version 10.11.6 or later for new Xcode 8.2 Xcode - Version ...
Here we are managing multiple collection there delegate methods with didselect events. extension ProductsVC: UICollectionViewDelegate, UICollectionViewDataSource{ // MARK: - UICollectionViewDataSource func collectionView(_ collectionView: UICollectionView, numberOfItemsI...
Combining change of character case with Enumeration_IO and using a text buffer for the image. The first character is manipulated in place. with Ada.Text_IO; use Ada.Text_IO; with Ada.Characters.Handling; use Ada.Characters.Handling; procedure Main is type Fruit is (Banana, Pear, Orange, Me...
The component code is given as below. import { Component } from '@angular/core'; @Component({ selector: 'my-app', template: '<h1>{{title}}</h1>' }) export class MyAppComponent{ title = 'welcome'; } For angular testing, angular provide its testing utilities along with t...
1. Fetching the JSON response for last modified (latest) artifact latestArtifactUriResponse=curl -u username:password --silent https://hostname.com/artifactory/api/storage/<repo_name>/<folder_name>/?lastModified | grep uri | awk '{ print $3 }' | sed s/\"//g | sed s/,//g It will ...
The following server-side configuration allows CORS request to work along with Windows Authentication (no anonymous must be enabled in IIS). web.config - allow unauthenticated (anonymous) preflight requests (OPTIONS) <system.web> <authentication mode="Windows" /> &l...
The following example shows how to properly construct both GET and POST requests against Web API 2 (CORS must be configured server-side, if sent from another domain): <script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.js"></script> CORS with Wi...
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js"></script> CORS with Windows Authentication test (Angular) <script type="text/javascript"> var app = angular.module('myApp', []); app.c...
BEGINS - returns TRUE if one string begins with another string. string1 BEGINS string2 If string1 BEGINS with (or is equal to) string2 this will return true. Otherwise it will return false. If string two is empty ("") it will always return true. BEGINS is very useful in queries wher...
There are standard functions built in for comparing equality, inequality etc. NameSymbolAlternativeExampleEqual=EQi = jNot equal<>NEi <> jLess than<LTi < jless than or equal<=LEi <= jGreater than>=GTi > jGreater than or equal≥=GEi >= j The symbol can be exchanged w...
Python includes a profiler called cProfile. This is generally preferred over using timeit. It breaks down your entire script and for each method in your script it tells you: ncalls: The number of times a method was called tottime: Total time spent in the given function (excluding time made in c...
UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init]; [refreshControl addTarget:self action:@selector(pullToRefresh:) forControlEvents:UIControlEventValueChanged]; self.scrollView.alwaysBounceVertical = YES; [self.scrollView addSubview:refreshControl]; - (void)pullToRefresh:(UIRe...
Swift 3 import UIKit // Save String to file let fileName = "TextFile" let documentDirectory = try FileManager.default.urlForDirectory(.documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true) var fileURL = try documentDirectory.appendingPathComponent(fileName).ap...
As mentioned before strings are normally case insensitive but that only regards comparison of strings. There's built in functions for changing case. CAPS (string) Makes string upper case LC(string) Makes string lower case DEFINE VARIABLE c AS CHARACTER NO-UNDO. DEFINE VARIABLE d AS C...
You can create you own Scala annotations by creating classes derived from scala.annotation.StaticAnnotation or scala.annotation.ClassfileAnnotation package animals // Create Annotation `Mammal` class Mammal(indigenous:String) extends scala.annotation.StaticAnnotation // Annotate class Platypus...
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...
Once you have installed a library, you need to include it in your sketch in order to use it. Open the Sketch Menu > Include Library and click the Library you want to include. Now, the IDE has generated the required inclusion tags into your code. Now the Library is included in your ...
Using DYNAMIC-FUNCTION or the CALL-object you can dynamically call functions. DEFINE VARIABLE posY AS INTEGER NO-UNDO. DEFINE VARIABLE posX AS INTEGER NO-UNDO. DEFINE VARIABLE OKkeys AS CHARACTER NO-UNDO INIT "QLDRUS". DEFINE VARIABLE Step AS INTEGER NO-...
The following updates a User object via a PUT request and prints the status code of the request: package main import ( "bytes" "encoding/json" "fmt" "net/http" ) type User struct { Name string Email string } func main...

Page 694 of 826