Tutorial by Examples

This is example of Bootstrap version 3 Navbar: <nav class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> ...
<nav class="navbar navbar-default"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="#"> <img alt="Brand" src="..."> </a> ...
Tomcat's Host Manager application by default is located at http://localhost:8080/host-manager, but is not accessible until a user is given permission in the conf/tomcat-users.xml file. The file needs to have: A manager-gui role A user with this role For example: <tomcat-users> ......
Once you have access to the host-manager, the GUI will let you add a virtual host. Note: In Tomcat 7 and 8, adding a virtual host via the GUI does not write the vhost to config files. You will need to manually edit the server.xml file to have the vhost available after a restart. See http://tomc...
Once a virtual host has been added via the web application, directories will exist at: {CATALINA_HOME}\conf\Catalina\{Name} {CATALINA_HOME}\{App Base} To persist the virtual host after a restart, the server.xml file must be updated with the configuration. A Host element needs to be added inside...
2.04 Bash treats some paths as special and can do some network communication by writing to /dev/{udp|tcp}/host/port. Bash cannot setup a listening server, but can initiate a connection, and for TCP can read the results at least. For example, to send a simple web request one could do: exec 3</...
The child themes are meant to be a safe way to keep customizations of the main template without fearing to lose them on a theme update. Basically, whenever you want to edit a file inside the active template from your website you have to ask yourself "What is going to happen when I will update ...
A child theme is identified by WordPress when there is a directory (for example child-theme) inside /wp-content/themes/ with the following files: style.css This file must start with a comment template like this: /* Theme Name: Example Child Author: Me Author URI: https://example.com/ ...
The most common usage of a child theme is to override template parts. For example, a sidebar, if we have a theme with the following file at /themes/template/sidebar.php <?php /** * The sidebar containing the main widget area. * * @link https://developer.wordpress.org/themes/basics/templa...
Even if it is not a best practice, sometimes you need to replace assets like CSS or JS files or libraries. Note that the WordPress template overwriting system doesn't work with anything else than .php files, so when we talk about assets we refer to registered assets One example could be the replac...
Steps to reset database in Heroku: 1. Drop the database, when SHARED_DATABASE_URL is used: heroku pg:reset DATABASE 2. Recreate the database with nothing in it: heroku run rake db:migrate 3. Populate the database with your seed data: heroku run rake db:seed Steps 2 and 3 can be combined...
Sometimes we have requirement of parsing pages, but doing so requires you to be an authorised user. Here is an example which shows you how to do in oracle sign in. import sys import requests import json from bs4 import BeautifulSoup def mprint(x): sys.stdout.write(x) print re...
Load an image from an asset catalog using UIImage.FromBundle(string imageName) UIImage image = UIImage.FromBundle("ImageName"); // use the name of the image set from the asset catalog You can use the image for a UIImageView or anything else you need to do.
Asset catalogs allow managing images, app icons, and launch images. Image Set is used for images which are displayed in the app. Universal images are usually the best option. You can either use a vector based image (such as PDF) which will scale for all screens, or include a 1x, 2x, and 3x variant...
Asset catalog images can be used from storyboards like any other kind of image added to the project. They will be automatically populated as an option in UIImageView and other views which support adding an image.
Executing a task with the background worker. Double Click on the BackgroundWorker control from the Toolbox This is how the BackgroundWorker appears after adding it. Double click on the added control to get the BackgroundWorker1_DoWork event and add the code to be executed when the BackgroundW...
You cannot access any GUI components from the BackgroudWorker. For example if you try to do something like this Private Sub BackgroundWorker1_DoWork(sender As Object, e As DoWorkEventArgs) TextBox1.Text = "Done" End Sub you will receive a runtime error saying that "Cross-thr...
Yii Framework 2.0 ships with built-in support for Pjax, a JavaScript library that reduces page load times. It accomplishes this by only updating the part of the page that has changed through Ajax, which can translate into substantial savings if you have many other assets on your pages. A few of our ...
Installers are custom types that implement the IWindsorInstaller interface and are used to register Components to the container, using the fluent registration API. public class MyInstaller : IWindsorInstaller { public void Install(IWindsorContainer container, IConfigurationStore store) {...
When registering types to the container Castle uses the type of the class in order to resolve. In the case that there is more than one registration for a specific type the Name property must be set: public void Install(IWindsorContainer container, IConfigurationStore store) { container.Regist...

Page 857 of 1336