Tutorial by Examples: ect

The pickle module implements an algorithm for turning an arbitrary Python object into a series of bytes. This process is also called serializing the object. The byte stream representing the object can then be transmitted or stored, and later reconstructed to create a new object with the same charact...
Vectors in R can have different types (e.g. integer, logical, character). The most general way of defining a vector is by using the function vector(). vector('integer',2) # creates a vector of integers of size 2. vector('character',2) # creates a vector of characters of size 2. vector('logical',2...
Before using your own object as key you must override hashCode() and equals() method of your object. In simple case you would have something like: class MyKey { private String name; MyKey(String name) { this.name = name; } @Override public boolean equals(Object ...
Creating a custom directive with isolated scope will separate the scope inside the directive from the outside scope, in order to prevent our directive from accidentally change the data in the parent scope and restricting it from reading private data from the parent scope. To create an isolated scop...
5.1 JavaScript does not directly support enumerators but the functionality of an enum can be mimicked. // Prevent the enum from being changed const TestEnum = Object.freeze({ One:1, Two:2, Three:3 }); // Define a variable with a value from the enum var x = TestEnum.Two; // Prin...
git is fundamentally a key-value store. When you add data to git, it builds an object and uses the SHA-1 hash of the object's contents as a key. Therefore, any content in git can be looked up by it's hash: git cat-file -p 4bb6f98 There are 4 types of Object: blob tree commit tag
A commit is probably the object type most familiar to git users, as it's what they are used to creating with the git commit commands. However, the commit does not directly contain any changed files or data. Rather, it contains mostly metadata and pointers to other objects which contain the actual c...
A tree basically represents a folder in a traditional filesystem: nested containers for files or other folders. A tree contains: 0 or more blob objects 0 or more tree objects Just as you can use ls or dir to list the contents of a folder, you can list the contents of a tree object. $ git ca...
A blob contains arbitrary binary file contents. Commonly, it will be raw text such as source code or a blog article. But it could just as easily be the bytes of a PNG file or anything else. If you have the hash of a blob, you can look at it's contents. $ git cat-file -p d429810 package com.exampl...
To connect using java.sql.DriverManager you need a JDBC url to connect to your database. JDBC urls are database specific, but they are all of the form jdbc:<subprotocol>:<subname> Where <subprotocol> identifies the driver or database (for example postgresql, mysql, firebirdsql,...
The intrinsic pack function packs an array into a vector, selecting elements based on a given mask. The function has two forms PACK(array, mask) PACK(array, mask, vector) (that is, the vector argument is optional). In both cases array is an array, and mask of logical type and conformable with...
<!--- Define collection ---> <cfset attributes = { "name": "Sales", "type": "text", "value": "Connection" }> <!--- cfloop tag with attribute collection can be used to loop through the elements of a struc...
<cfscript> /*define collection*/ attributes = { "name": "Sales", "type": "text", "value": "Connection" }; for(attribute in attributes){ /* attribute variable will contain the key name of each key value ...
Meteor Tool To check the installed version of the Meteor tool, just run the following command outside of any Meteor projects: meteor --version To get a list of all official (recommended) Meteor releases, run: meteor show METEOR Meteor Projects If you want to check the project version of Me...
The Meteor Tool will notify you when a newer release is available. To update Meteor projects to the latest release, execute the following command inside a Meteor project: meteor update In case you want to update your Meteor project to a specific Meteor release, run the following command inside ...
Assuming your view is strongly typed to a view model like this public class CreateProduct { public IEnumerable<SelectListItem> Categories { set; get; } public int SelectedCategory { set; get; } } And in your GET action method, you are creating an object of this view model,...
5 With ES5+, the Object.create function can be used to create an Object with any other Object as it's prototype. const anyObj = { hello() { console.log(`this.foo is ${this.foo}`); }, }; let objWithProto = Object.create(anyObj); objWithProto.foo = 'bar'; objWithProto.hell...
ClientContext clientContext = new ClientContext(siteUrl); Web oWebsite = clientContext.Web; ListCollection collList = oWebsite.Lists; IEnumerable<List> resultCollection = clientContext.LoadQuery( collList.Include( list=>list.Title, list=>list.Id)); clientCo...
ClientContext clientContext = new ClientContext(siteUrl); SP.List oList = clientContext.Web.Lists.GetByTitle("Announcements"); ListItemCollectionPosition itemPosition = null; while (true) { CamlQuery camlQuery = new CamlQuery(); camlQuery.ListItemCollectionPosition = it...
ClientContext clientContext = new ClientContext("http://MyServer/sites/MySiteCollection"); GroupCollection collGroup = clientContext.Web.SiteGroups; clientContext.Load(collGroup); clientContext.Load(collGroup, groups => groups.Include( group => group.Users)); ...

Page 25 of 99