Tutorial by Examples: c

Objective-C Import the following to your ViewController #import <CoreImage/CoreImage.h> #import <CoreImage/CoreImage.h> #import <QuartzCore/QuartzCore.h> Call the function [self faceDetector]; Function definition: -(void)faceDetector { // Load the picture for face...
Go through the steps: Add 'NSAppleMusicUsageDescription' to your Info.plist for the privacy authority. Make sure your music is available in your iPhone. It will not work in the simulator. iOS 10.0.1 import UIKit import AVFoundation import MediaPlayer class ViewController: UIViewControll...
public static Boolean ExportDB(String DATABASE_NAME , String packageName , String folderName){ //DATABASE_NAME including ".db" at the end like "mayApp.db" String DBName = DATABASE_NAME.substring(0, DATABASE_NAME.length() - 3); File data = Environment.getDataDir...
For Microfocus, it uses the "SleepEx" API. As an example; environment division. special-names. call-convention 74 is winAPI. : : 01 wSleep-time pic 9(8) comp-5. 01 wSleep-ok pic 9(8) comp-5. ...
Core Plot provides a podspec, so you can use cocoapods as your library manager which should make installing and updating much simpler Install cocoapods on your system In the project directory add a text file to your project called Podfile by typing pod init in your project directory In the Podfil...
Although it might not be proper to do such thing in a view if you intend to separate concerns strictly, the php Blade directive allows a way to execute PHP code, for instance, to set a variable: @php($varName = 'Enter content ') (same as:) @php $varName = 'Enter content '; @endphp late...
Processing provides method rect() to draw a rectangle. This code draws a white 50 X 50 rectangle on black background. void setup() { size(500, 500); background(0); fill(255); noStroke(); } void draw() { rect(225, 225, 50, 50); } The signature of method rect() is thi...
You can do a multiline doctest by using '...>' for the lines following the first iex> Foo.Bar.somethingConditional("baz") ...> |> case do ...> {:ok, _} -> true ...> {:error, _} -> false ...> end true
Instances have a lot of metadata that gets returned from a call to describe-instances, but often times you just want to see the basics. You can use a JMESPath query combined with table output to show concise instance information in an easily readable way. aws ec2 describe-instances --output table -...
There are several packages which can run Processing sketches in the Atom editor. These instructions use the Script package. There are also available packages for syntax highlighting and autocomplete, which are required for Script to identify Processing filetypes. Install the Script plugin. Either b...
Advanced functions behave the in the same way as cmdlets. The PowerShell ISE includes two skeletons of advanced functions. Access these via the menu, edit, code snippets, or by Ctrl+J. (As of PS 3.0, later versions may differ) Key things that advanced functions include are, built-in, customiz...
In this example, we will look at a method for returning the last non-empty column in a row. This method will work regardless of empty regions within the data set. However caution should be used if merged cells are involved, as the End method will be "stopped" against a merged region, ret...
First of all, Merged Cells are there only to improve the look of your sheets. So it is literally the last thing that you should do, once your sheet and workbook are totally functional! Where is the data in a Merged Range? When you merge a Range, you'll only display one block. The data will be ...
class MyResourceAdapter implements javax.resource.spi.ResourceAdapter { public void start(BootstrapContext ctx){..} public void stop(){..} public void endpointActivation (MessageEndpoingFactory mf, ActivationSpec a){..} public void endpointDeactivation (MessageEndpoingFact...
Pigeonhole Sort is a sorting algorithm that is suitable for sorting lists of elements where the number of elements (n) and the number of possible key values (N) are approximately the same. It requires O(n + Range) time where n is number of elements in input array and ‘Range’ is number of possible va...
import Foundation class CookiesSingleton { static let instance : CookiesSingleton = CookiesSingleton() static var enableDebug = true func loadCookies() { if let cookiesDetails = NSUserDefaults.standardUserDefaults().objectForKey("customeWebsite") { for (keys,_) i...
Radix Sort is lower bound comparison based algorithm. It is a non-comparative integer sorting algorithm that sorts data with integer keys by grouping keys by individual digits which share some significant position and value. Radix sort is a linear time sorting algorithm that sort in O(n+k) time whe...
One easy algorithm to implement as a recursive function is factorial. ;;Compute the factorial for any n >= 0. Precondition: n >= 0, n is an integer. (defun factorial (n) (cond ((= n 0) 1) ;; Special case, 0! = 1 ((= n 1) 1) ;; Base case, 1! = 1 (t ...
If you're creating an image, decoding an image, or resizing an image to fit the large notification image area, you can get the correct pixel dimensions like so: Resources resources = context.getResources(); int width = resources.getDimensionPixelSize(android.R.dimen.notification_large_icon_width)...
DBCC commands enable user to maintain space in database, clean caches, shrink databases and tables. Examples are: DBCC DROPCLEANBUFFERS Removes all clean buffers from the buffer pool, and columnstore objects from the columnstore object pool. DBCC FREEPROCCACHE -- or DBCC FREEPROCCACHE (0x06...

Page 606 of 826