Tutorial by Examples

WordPress is applying pre_get_posts filter to literally any loop it generates. It means that all changes we are making in our callback function are applied to all exiting loops. Obviously it is not what we want in most scenarios. In most cases we would like to target only main loop, and only for n...
Analog to np.loadtxt, np.savetxt can be used to save data in an ASCII file import numpy as np x = np.random.random([100,100]) np.savetxt("filename.txt", x) To control formatting: np.savetxt("filename.txt", x, delimiter=", " , newline="\n", comment...
' Just setting up the example Public Class A Public Property ID as integer Public Property Name as string Public Property OtherValue as Object End Class Public Sub Example() 'Setup the list of items Dim originalList As New List(Of A) originalList.Add(New A() With {...
:!mkdir -p %:h to create the missing directories, then :w
Setting up the folders This example assumes code to be in src/ and the output to be put into out/. As such the folder structure should look something like example/ |-- src/ | |-- index.js | `-- ... |-- out/ `-- package.json Setting up the packages Assuming a setup npm environment, we...
Setup After setting up a simple project to use webpack, babel and react issuing $npm i -g webpack-dev-server will install the development http server for quicker development. Modifying webpack.config.js var path = require('path'); module.exports = { entry: './src/index.js', output: { ...
This creates a window in fullscreen with size 500x500 pixels: pygame.init() screen = pygame.display.set_mode((500, 500), pygame.FULLSCREEN) screen represents from now on the window on screen; it is a pygame.Surface object. Anything that should be come visible to the user has to be drawn onto it...
System Requirements: Node JS Getting Started First Go to Firebase Console and Create New Project. After Creating the project, in project click on settings icon besides project Name in left sidebar and select Permissions. On Permissions Page Click on Service accounts in left sidebar then c...
A cycle in a directed graph exists if there's a back edge discovered during a DFS. A back edge is an edge from a node to itself or one of the ancestors in a DFS tree. For a disconnected graph, we get a DFS forest, so you have to iterate through all vertices in the graph to find disjoint DFS trees. ...
Variance measures how far a set numbers is spread out from it's mean. From practical perspective it is squared distance from its mean (center) - the bigger the number the farther the point is. The following example would return variance of salary values SELECT name, salary, VARIANCE(salary) "...
STDDEV returns the sample standard deviation of expr, a set of numbers. You can use it as both an aggregate and analytic function. It differs from STDDEV_SAMP in that STDDEV returns zero when it has only 1 row of input data, whereas STDDEV_SAMP returns null. Oracle Database calculates the standard ...
Text box controls are typically used to accept input from the user. A text box control can accept one or more lines of text depending upon the settings of the TextMode attribute. Label controls provide an easy way to display text which can be changed from one execution of a page to the next. If you...
A check box displays a single option that the user can either check or uncheck and radio buttons present a group of options from which the user can select just one option. To create a group of radio buttons, you specify the same name for the GroupName attribute of each radio button in the group. If...
ASP.NET provides the following controls Drop-down list List box Radio button list Check box list Bulleted list These control let a user choose from one or more items from the list. List boxes and drop-down lists contain one or more list items. These lists can be loaded either by code or b...
A radio button list presents a list of mutually exclusive options. A check box list presents a list of independent options. These controls contain a collection of ListItem objects that could be referred to through the Items property of the control. Basic syntax of radio button list: <asp:RadioB...
The bulleted list control creates bulleted lists or numbered lists. These controls contain a collection of ListItem objects that could be referred to through the Items property of the control. Basic syntax of a bulleted list: <asp:BulletedList ID="BulletedList1" runat="server&quo...
The HyperLink control is like the HTML element. Basic syntax for a hyperlink control: <asp:HyperLink ID="HyperLink1" runat="server"> HyperLink </asp:HyperLink> It has the following important properties: PropertiesDescriptionImageUrlPath of the image to be ...
The image control is used for displaying images on the web page, or some alternative text, if the image is not available. Basic syntax for an image control: <asp:Image ID="Image1" runat="server"> It has the following important properties: PropertiesDescriptionAlternat...
pages = [] crawler = Anemone::Core.new(url, options) crawler.on_every_page do |page| results << page.url end crawler.run
Ionic inputs are no different from normal HTML inputs but they are styled differently and used as a directive. You can also use normal HTML inputs in Ionic apps. Here are some basic examples that Ionic offers ready-to-go. Checkbox: <ion-checkbox ng-model="checkbox">Label</ion-ch...

Page 883 of 1336