Tutorial by Examples: ect

Format: cd "<path>" Example: cd "C:\Program Files (x86)\Microsoft Office" cd is an abbreviation for chdir and the two commands behave in the exact same way. For the sake of consistency, cd will be used throughout this topic. To navigate to the directory one leve...
cd by itself will not allow a user to move between drives. To move to a different drive, the /d option must be specified. e.g. Moving from C:\Users\jdoe\Desktop to D:\Office Work cd /d "D:\Office Work"
Usage to list all folders and files in the current directory: dir A target directory can also be specified: dir C:\TargetPath When specifying a path with spaces, it must be surrounded by quotes: dir "C:\Path With Spaces"
PHPUnit has two assertions to check values of class properties: assertAttributeSame($expected, $actualAttributeName, $actualClassOrObject, $message = '') assertAttributeNotSame($expected, $actualAttributeName, $actualClassOrObject, $message = '') These methods will check the value of a object p...
Attributes can be useful for denoting metadata on enums. Getting the value of this can be slow, so it is important to cache results. private static Dictionary<object, object> attributeCache = new Dictionary<object, object>(); public static T GetAttribute<T, V>(this V va...
Note that the allowDiskUse: true option is optional but will help mitigate out of memory issues as this aggregation can be a memory intensive operation if your collection size is large - so i recommend to always use it. var duplicates = []; db.transactions.aggregate([ { $group: { _id: { c...
extern crate gtk; use gtk::prelude::*; use gtk::{Window, WindowType, Label, Entry, Box as GtkBox, Orientation}; fn main() { if gtk::init().is_err() { println!("Failed to initialize GTK."); return; } let window = Window::new(WindowType::Toplevel); ...
GCobol identification division. program-id. inspecting. data division. working-storage section. 01 ORIGINAL pic XXXX/XX/XXBXX/XX/XXXXXXX/XX. 01 DATEREC pic XXXX/XX/XXBXX/XX/XXXXXXX/XX. procedure division. move fun...
To understand this example, it is recommended to have a brief idea about Bellman-Ford algorithm which can be found here Using Bellman-Ford algorithm, we can detect if there is a negative cycle in our graph. We know that, to find out the shortest path, we need to relax all the edges of the graph (V-...
Sometimes we need to collect data from google spreadsheets. We can use gspread and oauth2client libraries to collect data from google spreadsheets. Here is a example to collect data: Code: from __future__ import print_function import gspread from oauth2client.client import SignedJwtAssertionCred...
Apart from CSS, model, and binding selectors, protractor can also locate elements using xpath View <ul> <li><a href='http://www.google.com'>Go to google</a></li> </ul> Code var googleLink= element(by.xpath('//ul/li/a')); expect(element.getText()).to.event...
XPath selectors can be used to select elements with specific attributes, such as class, id, title etc. By Class View: <div class="HakunaMatata"> Hakuna Matata </div> Code: var theLionKing= element(by.xpath('//div[@class="HakunaMatata"]')); expect(theLionKing.g...
$productCollection = Mage::getModel('catalog/product')->getCollection(); Selecting the specific Attribute $productCollection->addAttributeToSelect(array('name', 'product_url', 'small_image')); Selecting the All Attributes $productCollection->addAttributeToSelect('*'); Add Filter ...
Query: query:/sitecore/content/home/foo/bar Result bar
In a const-correct class, all member functions which don't change logical state have this cv-qualified as const, indicating that they don't modify the object (apart from any mutable fields, which can freely be modified even in const instances); if a const cv-qualified function returns a reference, t...
In a const-correct function, all passed-by-reference parameters are marked as const unless the function directly or indirectly modifies them, preventing the programmer from inadvertently changing something they didn't mean to change. This allows the function to take both const and non-cv-qualified ...
UILabel *label=[[UILabel alloc]initWithFrame:CGRectMake(0, 0, 320, 480)]; label.backgroundColor=[UIColor lightGrayColor]; NSMutableAttributedString *attributedString; attributedString = [[NSMutableAttributedString alloc] initWithString:@"Apply Underlining"]; [attributedString addAttrib...
import #include <math.h> The code in the viewDidLoad or loadView should look something look something like this - (void)loadView { [super loadView]; UIImageView *imageView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 50, 320, 320)]; [self.view addSubview:imageView]; UIImage *image=[U...
First import #import <QuartzCore/QuartzCore.h> into your ViewController class. Here is how I set my view in code UIView *view1=[[UIView alloc]init]; view1.backgroundColor=[UIColor colorWithRed:255/255.0 green:193/255.0 blue:72/255.0 alpha:1.0]; CGRect view1Frame = view1.frame; view1Frame....
HTML to NSAttributedString conversion Code :- //HTML String NSString *htmlString=[[NSString alloc]initWithFormat:@"<!DOCTYPE html><html><body><h1>My First Heading</h1><p>My first paragraph.</p></body></html>"]; //Converting HTML s...

Page 73 of 99