Tutorial by Examples: and

If you don't think that malicious scripts can harm your site, you are wrong. Here is a list of what a malicious script could do: Remove itself from the DOM so that it can't be traced Steal users' session cookies and enable the script author to log in as and impersonate them Show a fake "Yo...
For creating custom annotations we need to decide Target - on which these annotations will work on like field level, method level, type level etc. Retention - to what level annotation will be available. For this, we have built in custom annotations. Check out these mostly used ones: @Target...
When a notebook .Rmd is saved, an .nb.html file is created alongside it. This file is a self-contained HTML file which contains both a rendered copy of the notebook with all current chunk outputs (suitable for display on a website) and a copy of the notebook .Rmd itself. More info can be found at R...
import pip command = 'install' parameter = 'selenium' second_param = 'numpy' # You can give as many package names as needed switch = '--upgrade' pip.main([command, parameter, second_param, switch]) Only needed parameters are obligatory, so both pip.main(['freeze']) and pip.main(['freeze'...
When you use python file as module there is no need always check if package is installed but it is still useful for scripts. if __name__ == '__main__': try: import requests except ImportError: print("To use this module you need 'requests' module") t ...
ifconfig The above command will show all active interface of the machine and also give the information of IP address assign to interface MAC address of the interface Broadcast address Transmit and Receive bytes Some example ifconfig -a The above command also show the disable interfac...
Require is a statement that Node interprets as, in some sense, a getter function. For example, say you have a file named analysis.js, and the inside of your file looks like this, function analyzeWeather(weather_data) { console.log('Weather information for ' + weather_data.time + ': '); consol...
Consider this example: He went into the cafe "Dostoevski" and said: "Good evening." Here we have two sets of quotes. Let's assume we want to match both, so that our regex matches at "Dostoevski" and "Good evening." At first, you could be tempted to keep...
DICOM Standard - http://dicom.nema.org/standard.html - This link contains the current, official documents. They can be downloaded or read online as web pages. DICOM Browser - https://dicom.innolitics.com/ - This link is a useful website for browsing the various DICOM information objects.
To get a value use the .getPropertyValue() method element.style.getPropertyValue("--var") To set a value use the .setProperty() method. element.style.setProperty("--var", "NEW_VALUE")
This example will show you back navigation which is expected generally in most of the flows. You will have to add following code to every screen depending on expected behavior. There are 2 cases: If there are more than 1 screen on stack, device back button will show previous screen. If there is ...
Depending on whether you have installed composer globally or locally. Locally: php composer.phar create-project slim/slim-skeleton {my-app-name} Globally: composer create-project slim/slim-skeleton {my-app-name} If you are running a webserver (ex. Apache or nginx) point your virtualho...
If you want to see overall test coverage statistics than of course in Angular CLI you can just type below command, and see the bottom of your command prompt window for results. ng test --cc // or --code-coverage
// add tags and categories to pages function add_taxonomies_to_pages() { register_taxonomy_for_object_type( 'post_tag', 'page' ); register_taxonomy_for_object_type( 'category', 'page' ); } add_action( 'init', 'add_taxonomies_to_pages' ); if ( ! is_admin() ) { add_action( 'pre_get_posts...
You can add this code to your custom functions.php file: // add tags and categories to pages function add_taxonomies_to_pages() { register_taxonomy_for_object_type( 'post_tag', 'page' ); register_taxonomy_for_object_type( 'category', 'page' ); } add_action( 'init', 'add_taxonomies_to...
This sample demonstrates the use of AD B2C for securing an AngularJS based web and mobile app. Refer https://github.com/NewtonJoshua/Azure-ADB2C-Angularjs-sample Azure AD B2C Azure AD B2C is a cloud identity management solution for your web and mobile applications. It is a highly available global...
In this document we'll see how to create a Google Cloud SQL Instance and connect them in your Google App Engine application and MySQL Workbench admin tool. Google Cloud SQL: Google Cloud SQL is a fully-managed database service that makes it easy to set-up, maintain, manage and administer your rela...
To enable disk persistence you should enable the flag persistenceEnabled in the FirebaseDatabaseInstance object of your application: Android FirebaseDatabase.getInstance().setPersistenceEnabled(true); iOS Database.database().isPersistenceEnabled = true //Swift [FIRDatabase database].persisten...
Firebase synchronizes and stores a local copy of the data for active listeners when used on mobile devices. In addition, you can keep specific locations in sync. Android : DatabaseReference workoutsRef = FirebaseDatabase.getInstance().getReference("workouts"); scoresRef.keepSynced(true)...
var sourceFileName = "NonExistingFile"; try { System.IO.File.Copy(sourceFileName, "DestinationFile"); } catch (Exception e) { var stdErr = Console.Error; stdErr.WriteLine($"Failed to copy '{sourceFileName}': {e.Message}"); }

Page 150 of 153