Tutorial by Examples: c

;; disable automatic loading of packages after the init file (setq package-enable-at-startup nil) ;; instead load them explicitly (package-initialize) ;; refresh package descriptions (unless package-archive-contents (package-refresh-contents)) ;;; use-package initialization ;;; install ...
app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); This will match requests for /Home/Index, /Home/Index/123 and /
An element's opacity can be set using the opacity property. Values can be anywhere from 0.0 (transparent) to 1.0 (opaque). Example Usage <div style="opacity:0.8;"> This is a partially transparent element </div> Property ValueTransparencyopacity: 1.0;Opaqueopacity: 0....
Download the Datastax PHP driver for Apache Cassandra from the Git project site, and follow the installation instructions. We will be using the "users" table from the KillrVideo app and the Datastax PHP driver. Once you have Cassandra up and running, create the following keyspace and tabl...
Often times, responsive web design involves media queries, which are CSS blocks that are only executed if a condition is satisfied. This is useful for responsive web design because you can use media queries to specify different CSS styles for the mobile version of your website versus the desktop ver...
Changing some CSS attribute will trigger the browser to synchronously calculate the style and layout, which is a bad thing when you need to animate at 60fps. DON'T Animate with left and top trigger layout. #box { left: 0; top: 0; transition: left 0.5s, top 0.5s; position: absolute; ...
If you have a multi-parameter type-class with arguments a, b, c, and x, this extension lets you express that the type x can be uniquely identified from a, b, and c: class SomeClass a b c x | a b c -> x where ... When declaring an instance of such class, it will be checked against all other in...
Writes an error message to the console if the assertion is false. Otherwise, if the assertion is true, this does nothing. console.assert('one' === 1); Multiple arguments can be provided after the assertion–these can be strings or other objects–that will only be printed if the assertion is fals...
HTML comments (optionally preceded by whitespace) will cause code (on the same line) to be ignored by the browser also, though this is considered bad practice. One-line comments with the HTML comment opening sequence (<!--): Note: the JavaScript interpreter ignores the closing characters of H...
When developing several applications on one machine, it becomes useful to separate out dependencies into virtual environments. With the use of virtualenv, these environments are sourced into your shell so that when you run a command, it comes from that virtual environment. This is most commonly in...
To setup a new credential profile with the name myprofile: $ aws configure --profile myprofile AWS Access Key ID [None]: ACCESSKEY AWS Secret Access Key [None]: SECRETKEY Default region name [None]: REGIONNAME Default output format [None]: text | table | json For the AWS access key id and se...
Activity is the root UserInterface in Android and have it's own life-cycle. MainActivity.java public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Toast.makeText(this, "Activ...
In ASP.NET Core there are several different ways we can localize/globalize our app. It's important to pick a way that suits your needs. In this example you'll see how we can make a multilingual ASP.NET Core app that reads language specific strings from .json files and store them in memory to provi...
There are two ways to define functions with multiple parameters in F#, Curried functions and Tupled functions. let curriedAdd x y = x + y // Signature: x:int -> y:int -> int let tupledAdd (x, y) = x + y // Signature: x:int * y:int -> int All functions defined from outside F# (such as ...
Type erasure is a way to hide the type of an object from code using it, even though it is not derived from a common base class. In doing so, it provides a bridge between the worlds of static polymorphism (templates; at the place of use, the exact type must be known at compile time, but it need not b...
The stack is a small region of memory into which temporary values are placed during execution. Allocating data into the stack is very fast compared to heap allocation, as all the memory has already been assigned for this purpose. int main() { int a = 0; //Stored on the stack return a; } ...
The term 'heap' is a general computing term meaning an area of memory from which portions can be allocated and deallocated independently of the memory provided by the stack. In C++ the Standard refers to this area as the Free Store which is considered a more accurate term. Areas of memory allocate...
There are situations when we don't want to rely upon Free Store for allocating memory and we want to use custom memory allocations using new. For these situations we can use Placement New, where we can tell `new' operator to allocate memory from a pre-allocated memory location For example int a4b...

Page 226 of 826