Tutorial by Examples: and

Objective C NSURL *url = [NSURL URLWithString:@"YOUR URL"]; AVPlayer *player = [AVPlayer playerWithURL:videoURL]; AVPlayerLayer *playerLayer = [AVPlayerLayer playerLayerWithPlayer:player]; playerLayer.frame = self.view.bounds; [self.view.layer addSublayer:playerLayer]; [player play];...
NSMutableDictionary *attributesDictionary = [NSMutableDictionary dictionary]; [attributesDictionary setObject:[UIFont systemFontOfSize:14] forKey:NSFontAttributeName]; //[attributesDictionary setObject:[UIColor redColor] forKey:NSForegroundColorAttributeName]; NSMutableAttributedString *attri...
To create a Swift Package, open a Terminal then create an empty folder: mkdir AwesomeProject cd AwesomeProject And init a Git repository: git init Then create the package itself. One could create the package structure manually but there's a simple way using the CLI command. If you want to ...
lessc [options] <source> [destination] The above command is used to compile Less files in the command line. Options are the various settings that the compiler should use either during compilation or after compilation. Options include -x or --compress for compressing or minifying the output ...
When deriving Serialize and Deserialize implementations for structs with generic type parameters, most of the time Serde is able to infer the correct trait bounds without help from the programmer. It uses several heuristics to guess the right bound, but most importantly it puts a bound of T: Seriali...
Those that are using TortioseGit UI click Right Mouse on the file (or folder) you want to ignore -> TortoiseGit -> Delete and add to ignore list, here you can choose to ignore all files of that type or this specific file -> dialog will pop out Click Ok and you should be done.
CoffeeScript provides a basic class structure that allows you to name your class, set the superclass, assign prototypal properties, and define the constructor, in a single assignable expression. Small example below: class Animal constructor: (@name) -> move: (meters) -> alert @n...
This example demonstrates how you can respond to a button click by performing some work on a worker thread and then update the user interface to indicate completion void MyButton_OnClick(object sender, EventArgs args) { Task.Run(() => // Schedule work using the thread pool { ...
AsyncTask is an abstract Class and does not inherit the Thread class. It has an abstract method doInBackground(Params... params), which is overridden to perform the task. This method is called from AsyncTask.call(). Executor are part of java.util.concurrent package. Moreover, AsyncTask contains 2 ...
ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo Info = cm.getActiveNetworkInfo(); if (Info == null || !Info.isConnectedOrConnecting()) { Log.i(TAG, "No connection"); } else { ...
When you install Git, you also get its visual tools, gitk and git-gui. gitk is a graphical history viewer. Think of it like a powerful GUI shell over git log and git grep. This is the tool to use when you’re trying to find something that happened in the past, or visualize your project’s history. ...
Exec sp_configure 'show advanced options' ,1 RECONFIGURE GO -- Show all configure sp_configure
This is the image of project structure in Android studio: This is the image of project structure of nativescript project: As you see they are same. so we can write java code in nativescript as we write in android studio. We want to Add Toast to the default app of nativescript. after creating...
If you want to extract a folder, but you want to exclude one or several folders during the extraction, you can use the --exclude option. tar -cf archive.tar ./my-folder/ --exclude="my-folder/sub1" --exclude="my-folder/sub3" With this folder tree : my-folder/ sub1/ su...
$ sleep 500 & [1] 7582 Puts the sleep command in background. 7582 is the process id of the background process.
SELECT SERVERPROPERTY('ProductVersion') AS ProductVersion, SERVERPROPERTY('ProductLevel') AS ProductLevel, SERVERPROPERTY('Edition') AS Edition, SERVERPROPERTY('EngineEdition') AS EngineEdition;
Since a Vimscript file is a collection of Command mode actions, the user needs to specify that the desired actions should be executed in normal mode. Therefore executing a normal mode command like i, a, d etc. in Vimscript is done by prepending the command with normal: Going to the bottom of the f...
You can allow role to access some action on resource by: $acl->allow('Administrator', 'products', 'create'); You can deny role to access some action on resource by: $acl->deny('Customer', 'categories', 'create'); You can check if role is allowed to some action on resource by using: $a...
By implementing Phalcon\Acl\RoleAware or Phalcon\Acl\ResourceAware you can use them as objects in Phalcon\Acl\Adapter\Memory::isAllowed(). // Create our class which will be used as roleName class UserRole implements Phalcon\Acl\RoleAware { protected $id; protected $roleName; publ...
Modifying the strings returned by the standard functions getenv(), strerror() and setlocale() is undefined. So, implementations may use static storage for these strings. The getenv() function, C11, §7.22.4.7, 4, says: The getenv function returns a pointer to a string associated with the matched...

Page 80 of 153