Tutorial by Examples: is

That would get more control over serialization, how to save and load types Implement ISerializable interface and create an empty constructor to compile [Serializable] public class Item : ISerializable { private string _name; public string Name { get { return _name; } ...
Implements a serialization surrogate selector that allows one object to perform serialization and deserialization of another As well allows to properly serialize or deserialize a class that is not itself serializable Implement ISerializationSurrogate interface public class ItemSurrogate : ISerial...
The first element of sys.argv[0] is the name of the python file being executed. The remaining elements are the script arguments. # script.py import sys print(sys.argv[0]) print(sys.argv) $ python script.py => script.py => ['script.py'] $ python script.py fizz => script.py ...
Environment variables that affect the go tool can be viewed via the go env [var ...] command: $ go env GOARCH="amd64" GOBIN="/home/yourname/bin" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/yourname&q...
Quantitative data is often read in as strings that must be converted to numeric types before processing. The types of all list items can be converted with either a List Comprehension or the map() function. # Convert a list of strings to integers. items = ["1","2","3",...
os.chmod(path, mode) where mode is the desired permission, in octal.
iPhone OS 1 First iteration of Apple's touch-centric mobile operating system. No official name is given on its initial release; Apple marketing literature simply stated the iPhone runs a version of Apple's desktop operating system, OS X.On March 6, 2008, with the release of the iPhone software deve...
The AUROC is one of the most commonly used metric to evaluate a classifier's performances. This section explains how to compute it. AUC (Area Under the Curve) is used most of the time to mean AUROC, which is a bad practice as AUC is ambiguous (could be any curve) while AUROC is not. Overview – Abb...
A compound literal is an unnamed object which is created in the scope where is defined. The concept was first introduced in C99 standard. An example for compound literal is Examples from C standard, C11-§6.5.2.5/9: int *p = (int [2]){ 2, 4 }; p is initialized to the address of the first ele...
These are the bitwise operators in VB.NET : And, Or, Xor, Not Example of And bitwise operation Dim a as Integer a = 3 And 5 The value of a will be 1. The result is obtained after comparing 3 and 5 in binary for. 3 in binary form is 011 and 5 in binary form is 101. The And operator places 1 if ...
select * from sys.dm_resource_governor_workload_groups select * from sys.dm_resource_governor_resource_pools
Given the following XML document: <documentation> <tags> <tag name="Java"> <topic name="Regular expressions"> <example>Matching groups</example> <example>Escaping metacharacter...
Sometimes specific instances of data should be used. Recreation is not desired and referencing static data would have a code smell. It is possible to specify a XmlAdapter instance the Unmarshaller should use, which allows the user to use XmlAdapters with no zero-arg constructor and/or pass data to ...
ARC can be disabled for individual files by adding the -fno-objc-arc compiler flag for each file. Conversely it can be added in Targets ▸ Build Phases ▸ Compile Sources
import std.stdio; bool isPrime(int number) { foreach(i; 2..number) { if (number % i == 0) { return false; } } return true; } void main() { writeln(2.isPrime); writeln(3.isPrime); writeln(4.isPrime); 5.isPrime.writeln; } ...
Notice, that in order to change file prmissions, your device need to be rooted, su binary doesn't come with factory shipped devices! Convention: adb shell su -c "chmod <numeric-permisson> <file>" Numeric permission constructed from user, group and world sections. For exa...
You can add a "Browse Our Other Apps" button in your app, listing all your(publisher) applications in the Google Play Store app. String urlApp = "market://search?q=pub:Google+Inc."; String urlWeb = "http://play.google.com/store/search?q=pub:Google+Inc."; try { I...
If you just want to get data, but not modify anything, you can turn off change tracking and proxy creation. This will improve your performance and also prevent lazy loading. Bad Example: using(var context = new Context()) { return await context.Set<MyEntity>().ToListAsync().ConfigureAw...
A component can be registered either globally or locally (bind to another specific component). var Child = Vue.extend({ // ... }) var Parent = Vue.extend({ template: '...', components: { 'my-component': Child } }) Thiw new component () will only be available in...
You can extend and register a component in one step: Vue.component('custom-component', { template: '<div>A custom component!</div>' }) Also when the component is registered locally: var Parent = Vue.extend({ components: { 'custom-component': { templa...

Page 45 of 109