Tutorial by Examples

Sample Example Taken from one benchmarking import ijson def load_json(filename): with open(filename, 'r') as fd: parser = ijson.parse(fd) ret = {'builders': {}} for prefix, event, value in parser: if (prefix, event) == ('builders', 'map_key'): ...
So the main goal of this function is to : Be standalone because it needs to be written in the main VbScript file and cannot be in an included file (because it defines the include function) Provide enough information if something goes wrong (ie. the file that was being included, the error that oc...
To include a file in another file, just use the one liner : IncludeFile "myOtherFile.vbs"
If our component is not ready and waiting for data from server, then we can add loader using *ngIf. Steps: First declare a boolean: loading: boolean = false; Next, in your component add a lifecycle hook called ngOnInit ngOnInit() { this.loading = true; } and after you get complete dat...
<p class="alert alert-success" *ngIf="names.length > 2">Currently there are more than 2 names!</p>
NgFor provides Some values that can be aliased to local variables index -(variable) position of the current item in the iterable starting at 0 first -(boolean) true if the current item is the first item in the iterable last -(boolean) true if the current item is the last item in the iterable ...
<?php if (!function_exists('document')) { function document($text = '') { return $text; } } Create a helpers.php file, let's assume for now it lives in app/Helpers/document.php. You can put many helpers in one file (this is how Laravel does it) or you can split them up b...
Now let's create a service provider. Let's put it under app/Providers: <?php namespace App\Providers; class HelpersServiceProvider extends ServiceProvider { public function register() { require_once __DIR__ . '/../Helpers/document.php'; } } The above service pr...

Use

Now you can use the function document() everywhere in your code, for example in blade templates. This example only returns the same string it receives as an argument <?php Route::get('document/{text}', function($text) { return document($text); }); Now go to /document/foo in your brows...
To generate schema, view, controller, migration file for the repository, default CRUD templates and test files for a model (like a scaffolding in Rails) one can use phoenix.gen.html mix task like this: mix phoenix.gen.html Book books title note:text pages:integer author_id:references:authors Wh...
Increment / Decrement A pointer can be incremented or decremented (prefix and postfix). Incrementing a pointer advances the pointer value to the element in the array one element past the currently pointed to element. Decrementing a pointer moves it to the previous element in the array. Pointer ari...
Unfortunately Sencha does not directly give you access to Extjs 4. Their download SDK links lead directly to the newer version of Extjs (currently 6). Although you can still find websites that are hosting the library files (I will have to leave you to it since Extjs is under the LGPL license for o...
Detailed instructions on getting perforce set up or installed.
Streams come in three flavors. Release streams (yellow), Mainlines (Grey) and Development (Blue). Each stream has a different purpose and rules related to its function.
Display the date by itself (custom field is tour_date): <p>Tour Date <?php the_field('tour_date');?></p>
Let's say you want to show a text field (announcement) based on the time (a scheduled notification message for instance). You need two date-time fields. In our example, one is called start_date and the other end_date. <?php $DateNow = date('Y-m-d H:i:s'); $DateStart = get_field('start_date',...
To enable SSH create a file called ssh in the /boot directory of your SD card. Identify the drive letter associated with your SD card. Open a command prompt (press Win+R on your keyboard to open the Run window. Then, type cmd) Enter the following at the command prompt (replacing Drive...
Go to File --> Settings --> click plugins in left hand pane --> Search for cucumber --> Install plugin
This is a quick guide to get Robot Framework 3.0 working on a Windows machine using Python 2.7.11 - It does not go into too much depth on the why and how, it simply gets you up and running. First things are first, let't go and install Python! Download Python 2.7.11 for Windows. (Windows x86-64 ...
At the end of the document add the following: \bibliographystyle{style} \bibliography{file location} Create a file with extension .bib and save the citation as follows: @inproceedings{citation_name, title={Paper Title}, author={List Authors}, pages={45--48}, year={2013}, organizat...

Page 1077 of 1336