Tutorial by Examples: o

Add this dependency to the Cargo.toml file: [dependencies] iron = "0.4.0" Run cargo build and Cargo will download and install the specified version of Iron.
Contrary to original documentation, I found this to be the way to properly nest children routes inside the app.routing.ts or app.module.ts file (depending on your preference). This approach works when using either WebPack or SystemJS. The example below shows routes for home, home/counter, and home/...
create table tgt ( id, val ) as select 1, 'a' from dual union all select 2, 'b' from dual ; Table TGT created. create table src ( id, val ) as select 1, 'x' from dual union all select 2, 'y' from dual ; Table SRC created. update ( select t.val as t_val, s.val as s_val ...
Detailed instructions on getting word-vba set up or installed.
def merge(X, Y): " merge two sorted lists " p1 = p2 = 0 out = [] while p1 < len(X) and p2 < len(Y): if X[p1] < Y[p2]: out.append(X[p1]) p1 += 1 else: out.append(Y[p2]) p2 += 1 out += X[p...
The NgFor directive instantiates a template once per item from an iterable. The context for each instantiated template inherits from the outer context with the given loop variable set to the current item from the iterable. To customize the default tracking algorithm, NgFor supports trackBy option. ...
using UnityEngine; public class Audio : MonoBehaviour { AudioSource audioSource; AudioClip audioClip; void Start() { audioClip = (AudioClip)Resources.Load("Audio/Soundtrack"); audioSource.clip = audioClip; if (!audioSource.isPlaying) audio...
Change Directory Navigate to a directory cd [directory] Example: Changing to the projects directory username$ cd projects Navigate to the root directory (regardless of working directory) cd / Navigate to the parent directory (the directory containing the working directory) cd .. ...
1)First, add dependency in project.json - "Microsoft.AspNetCore.Session": "1.1.0", 2)In startup.cs and add AddSession() and AddDistributedMemoryCache() lines to the ConfigureServices like this- services.AddDistributedMemoryCache(); //This way ASP.NET Core will use a Memory Cach...
This helper is loaded using the following code: $this->load->helper('array'); The following functions are available: element() Lets you fetch an item from an array. The function tests whether the array index is set and whether it has a value. If a value exists it is returned. If a value ...
1. Go to File --> Settings (e.g. Ctrl+Alt+S ). 2. In the left-hand pane, select Plugins. 3.On the Plugins window, click "Install JetBrains plugin" or the "Browse repositories button".
1. Go to File --> Settings (e.g. Ctrl+Alt+S ). 2. In the left-hand pane, select Plugins. 3. On the Plugins window, click "Install plugin from disk button". 4. Select the desired plugin from your local machine. Click Apply button of the Settings/Preferences dialog. O...
Registering a custom post type does not mean it gets added to the main query automatically. You need to use pre_get_posts filter to add custom post types to main query. // Show posts of 'post' and 'book' custom post types on home page add_action( 'pre_get_posts', 'add_my_post_types_to_query' ); ...
DIO streams are currently not recognized by the Event extension. There is no clean way to obtain the file descriptor encapsulated into the DIO resource. But there is a workaround: open stream for the port with fopen(); make the stream non-blocking with stream_set_blocking(); obtain numeric file...
You can add below hooks to add your own logo and link to replace default wordpress logo. To add custom logo function custom_login_logo() { echo '<style type="text/css"> h1 a { background-image: url('.get_bloginfo('template_directory').'/images/custom-logo.png) !important; backgro...
Download the files from CodePlex and add them to the project. Or install the files with the Package Manager. PM> Install-Package EPPlus
Found under Terminal > Preferences General In the general tab, you can chose which profile is opened when you start terminal. You can set "Shells open with" to chose which directory terminal opens to, or specify a command to run each time you open a new terminal window or tab. Profil...
Class under test: public class GreetingsService { // class to be tested in isolation private UserService userService; public GreetingsService(UserService userService) { this.userService = userService; } public String getGreetings(int userId, LocalTime time) { // the...
@Spy annotation (or method) can be used to partially mock an object. This is useful when you want to partially mock behavior of a class. E.g. Assume that you have a class that uses two different services and and you want to mock only one of them and use the actual implementation of the other service...
There are already implemented forms within Django to change the user password, one example being SetPasswordForm. There aren't, however, forms to modify the user e-mail and I think the following example is important to understand how to use a form correctly. The following example performs the foll...

Page 807 of 1038