Tutorial by Examples

AVPlayer *avPlayer = [AVPlayer playerWithURL:[NSURL URLWithString:@"YOUR URL"]]; AVPlayerViewController *avPlayerCtrl = [[AVPlayerViewController alloc] init]; avPlayerCtrl.view.frame = self.view.frame; avPlayerCtrl.player = avPlayer; avPlayerCtrl.delegate = self; [...
This is a compact guide about how to quickly create an R package from your code. Exhaustive documentations will be linked when available and should be read if you want a deeper knowledge of the situation. See Remarks for more resources. The directory where your code stands will be refered as ./, an...
The possibilities are endless. as you can use this concept to pull the version number from your build system; such as git and use that version number in your project. CMakeLists.txt cmake_minimum_required(VERSION 3.8) project(project_name VERSION "0.0.0") configure_file(${path to con...
From the Terminal command line Get the current URL from Safari osascript -e 'tell app "safari" to get the url of the current tab of window 1' Get the active URL in Google Chrome osascript -e 'tell app "google chrome" to get the url of the active tab of window 1'
Get the name of the web page in Safari osascript -e 'tell app "safari" to get the name of the current tab of window 1' Get the title of the web page in Google Chrome osascript -e 'tell app "google chrome" to get the title of the active tab of window 1'
You're not limited to single line Applescript code. Here we take the previous two examples and combine them into a single function. #!/bin/bash pageinfo() { osascript -e \ 'tell app "safari" tell the current tab of window 1 return {url & "\n" & ...
If you you want to pass some data with the timer trigger you can do it with the userInfoparameter. Here is the simple approach that gives brief idea about how you can pass the data to triggered method from the Timer. [Swift 3] Timer.scheduledTimer(timeInterval: 1.0, target: self, selector:#selec...
In this example, three brief and comprehensive sub-examples are presented: Loading weights from available pre-trained models, included with Keras library Stacking another network for training on top of any layers of VGG Inserting a layer in the middle of other layers Tips and general rule-of-t...
A vignette is a long-form guide to your package. Function documentation is great if you know the name of the function you need, but it’s useless otherwise. A vignette is like a book chapter or an academic paper: it can describe the problem that your package is designed to solve, and then show ...
public static void cleanUpOldData(AmazonDynamoDB amazonDynamoDB, String dynamoDBTablesPrefix, String tableName, String dateRangeField, String dateHashKey, String dateIndex, Class clazz) { log.info(String.format("Cleaning old data from table: %s", tab...
To generate json user model with username, password_hash, email_id, created_at, updated_at, type mix phoenix.gen.json User users username:string email_id:string password_hash:string timestamps()
np.save and np.load provide a easy to use framework for saving and loading of arbitrary sized numpy arrays: import numpy as np a = np.random.randint(10,size=(3,3)) np.save('arr', a) a2 = np.load('arr.npy') print a2
The following code sample demonstrates a quick and easy means of encrypting and decrypting files using the AES symmetric encryption algorithm. The code randomly generates the Salt and Initialization Vectors each time a file is encrypted, meaning that encrypting the same file with the same password ...
First, you will need to install Push.js module. $ npm install push.js --save Or import it to your front-end app through CDN <script src="./push.min.js"></script> <!-- CDN link --> After you are done with that, you should be good to go. This is how it should look l...
Keep in mind that this will not work on Apple devices (I didnt test them all), but if you want to make push notifications check OneSignal plugin.
When you run mix phoenix.gen.html or mix phoenix.gen.json from command line, migrations are created in priv -> repo -> migrations in your project folder. To run migrations type mix ecto.migrate. To generate migrations for your project mix ecto.gen migrations <model_name> To generate m...
class UserRegistration(APIView): def post(self, request, *args, **kwargs): serializer = UserRegistrationSerializer(data=request.data) serializer.is_valid(raise_exception=True) serializer.save() return Response(serializer.to_representation(instance=serializer....
$http.post("\<domain\>/user-registration/", {username: username, password: password}) .then(function (data) { // Do success actions here });
Use Spring REST Docs to document your services. It's a powerful framework which makes sure that the Service logic is always inline with the documentation. In order to do so, you would have to write integration tests for your services. If there is any mismatch in the documentation & service beha...
Use Spring REST Docs to document your services. It's a powerful framework which makes sure that the Service logic is always inline with the documentation. In order to do so, you would have to write integration tests for your services. If there is any mismatch in the documentation & service beha...

Page 1328 of 1336