Tutorial by Examples: o

Font Awesome is an extremely simple yet powerful library to use, with 634 icons available in just a few words. How does it work? Font Awesome uses Unicode characters stored in a ../fonts directory to change any i.fa elements to the respective unicode character, as such displaying the icon as text....
<div class="container content"> <div class="row"> <!--Main Content--> <div class="col-lg-9 col-lg-push-3"> Main Content </div> <!--Sidebar--> <div class=&quot...
Rewrite Class File: Namespace/ModuleName/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <preference for="Ma...
Angular 2 has two kinds of custom validators. Synchronous validators as in the first example that will run directly on the client and asynchronous validators (the second example) that you can use to call a remote service to do the validation for you. In this example the validator should call the ser...
constructor(fb: FormBuilder) { this.form = fb.group({ firstInput: ['', Validators.compose([Validators.required, CustomValidators.cannotContainSpace]), CustomValidators.shouldBeUnique], secondInput: ['', Validators.required] }); } Here we use the FormBuilder to crea...
To detect a touch in Unity it's quite simple we just have to use Input.GetTouch() and pass it an index. using UnityEngine; using System.Collections; public class TouchExample : MonoBehaviour { void Update() { if (Input.touchCount > 0 && Input.GetTouch(0).phase == Touch...
$skuList = array('SKU-1', 'SKU-2',...,'SKU-n); $_productCollection = Mage::getModel('catalog/product') ->getCollection() ->addAttributeToFilter('sku', array('in' => $skuList)); OR $_productCollection = Mage::getResourceModel('catalog/product_collection') ->addAttributeToFilter('s...
find(query).projection(fields).cursorType(CursorType.TailableAwait).iterator(); That code applies to the MongoCollection class. CursorType is an enum and it has the following values: Tailable TailableAwait Corresponding to the old (<3.0) DBCursor addOption Bytes types: Bytes.QUERYOPTION...
This program will draw some shapes on the display, draw "hello world!" in the middle of the screen and let an image go to every corner of the window. You can use every image you want, but you will need to place the image file in the same directory as your program. the entire code: import...
This API, sometimes also referred to as "API v3", "YouTube Data API v3" or just "YouTube API", is the most commonly used YouTube API. It enables an application to read, alter, add or delete data related to videos, playlists and channels. This includes, but is not limite...
These APIs are used to query for video and channel analytics, like views/clicks and votes.
using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { var foo = new ClassWithDependency(); foo.DoSomething(); var bar = new InjectedDependency(); foo.Dependency = bar; ...
using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { var dep = new DefaultDependency(); var foo = new ClassWithDependency(dep); foo.DoSomething(); var bar = new Injected...
Imagine you have a class manager to manages sending mails (be called MailManager). In this, you have to log mails that are sent. A good solution is to transform the MailManager class into a service and then inject class for creating logs (Monolog for example) into the MailManager creating a service...
Get image from file lib.myImage = IMAGE lib.myImage.file = fileadmin/My-Image.png lib.myImage.file.width = 100 lib.myImage.file.height = 100 Get image from page properties lib.pageImage = IMAGE lib.pageImage { file.import.data = levelmedia: -1, "slide" file.impor...
Sample zipcode dataset in zipcodes.json stored in c:\Users\yc03ak1\Desktop\zips.json { "_id" : "01001", "city" : "AGAWAM", "loc" : [ -72.622739, 42.070206 ], "pop" : 15338, "state" : "MA" } { "_id" : "01...
Sample test dataset CSV file stored at the location c:\Users\yc03ak1\Desktop\testing.csv _id city loc pop state 1 A [10.0, 20.0] 2222 PQE 2 B [10.1, 20.1] 22122 RW 3 C [10.2, 20.0] 255222 RWE 4 D [10.3, 20.3] 226622 SFDS 5 E [10...
SQLite already has extensive documentation, which should not be duplicated here.
To view the first or last few records of a dataframe, you can use the methods head and tail To return the first n rows use DataFrame.head([n]) df.head(n) To return the last n rows use DataFrame.tail([n]) df.tail(n) Without the argument n, these functions return 5 rows. Note that the slice ...

Page 663 of 1038