My inspiration from reading *C++ Primer*, *Effective C++*, *More Effective C++*, *The C++ Standard Library* and some experience from coding.
Include:
* Debug
* C++ Syntax
* Habit && Optimization
* Trick
* Trap
* Reference
隨著 Visual Studio 2017 即將正式釋出,C# 7.0 也隨之來到。身為這次的改版,將會帶來許多方便的新功能
if (int.TryParse(input, out var answer))
WriteLine(answer);
else WriteLine("Could not parse input");
一起讓我們來看看 C# 7.0 的威力吧。
My inspiration from reading *C++ Primer*, *Effective C++*, *More Effective C++*, *The C++ Standard Library* and some experience from coding.
Include:
* Debug
* C++ Syntax
* Habit && Optimization
* Trick
* Trap
* Reference
隨著 Visual Studio 2017 即將正式釋出,C# 7.0 也隨之來到。身為這次的改版,將會帶來許多方便的新功能
if (int.TryParse(input, out var answer))
WriteLine(answer);
else WriteLine("Could not parse input");
一起讓我們來看看 C# 7.0 的威力吧。
here are some slides for introduction to C++. this slide is merely for basic understanding for C++. this powerpoint is written in Traditional Chinese(TW) and is owned by a group named "Awakening Lion" which I participate in.
This document discusses object-oriented programming (OOP) concepts in JavaScript, including classes, objects, properties, methods, inheritance, and custom objects. It provides examples of creating classes, defining properties and methods, instantiating objects, and extending classes through inheritance. Standard built-in objects like Math and custom objects like a Person class are demonstrated.
here are some slides for introduction to C++. this slide is merely for basic understanding for C++. this powerpoint is written in Traditional Chinese(TW) and is owned by a group named "Awakening Lion" which I participate in.
This document discusses object-oriented programming (OOP) concepts in JavaScript, including classes, objects, properties, methods, inheritance, and custom objects. It provides examples of creating classes, defining properties and methods, instantiating objects, and extending classes through inheritance. Standard built-in objects like Math and custom objects like a Person class are demonstrated.
TypeScript is a superset of JavaScript that adds static typing and classes to address the problem of writing large applications in JavaScript. It allows for intelligent IDE features like autocompletion and refactoring by adding types that are removed during compilation, ultimately producing plain JavaScript code. TypeScript aims to make large scale JavaScript development easier with types and tooling while still targeting the JavaScript that browsers understand.
This document discusses dependency injection (DI) in ASP.NET MVC, including its benefits such as improved maintainability, loose coupling, and increased testability. It provides examples of implementing DI through constructor injection and interfaces. It also covers using a DI container and integrating DI into ASP.NET MVC through a controller factory or dependency resolver. The examples shown use StructureMap as the DI container.
The document contains code examples demonstrating the use of Knockout.js to build single page applications with dynamic user interfaces. It includes examples of binding input elements to observables, building a reservations app with a view model and computed values, and routing with Sammy.js.
The document provides an introduction to Meteor and Meteoric frameworks. It discusses key principles of Meteor such as using one language across client and server, database access from anywhere, and automatic reactivity. It also covers how to install Meteor, create an app, define templates with helpers and events. Finally, it introduces Meteoric which integrates Meteor with Ionic for building mobile apps, including using Ionic directives and icons.
The document discusses various methods from the async module in Node.js for controlling asynchronous callback flow, including:
1) Executing tasks in series or parallel, cascading tasks together, queuing tasks with concurrency control, iterating over arrays, mapping arrays, and reducing arrays.
2) Additional methods for filtering arrays based on an async truth test, and detecting the first value in an array that passes an async truth test.
3) Examples are provided for each method demonstrating how to use the async module to control asynchronous control flow in Node.js applications.
This document provides an overview of basic TypeScript types including Boolean, Number, String, Array, Enum, Any, Void, and interfaces. It discusses TypeScript's structural subtyping approach to type checking interfaces based on their shape. The document also covers classes in TypeScript including inheritance, private/public modifiers, accessors, static properties, and how TypeScript code compiles to JavaScript.
The Promise object represents the eventual completion (or failure) of an asynchronous operation, and its resulting value. It allows asynchronous methods to be written in a more synchronous appearance. A Promise is in one of 3 states: pending, fulfilled, or rejected. The Promise constructor takes an executor function that is called immediately. The executor function has resolve and reject functions that can set the final state. The then() method allows registering callbacks for fulfillment and rejection. Chaining allows promises to be resolved in sequence.
This document introduces npm, Gulp and Bower. It explains that npm is a node package manager used to initialize and install packages through commands like npm init and npm install. Gulp is a task runner that can be installed via npm and requires a gulpfile.js. Bower is a client-side package manager that is also installed via npm and uses a bower.json file and bower_components folder.
Knockoutjs allows registering components as viewmodel/template pairs. A viewmodel can be specified as a constructor function, createViewModel factory function, or AMD module. A template can be an element ID, existing element, string of markup, or array of DOM nodes. The component binding injects the component template and binds the viewmodel. Components go through a lifecycle of loading, initialization, activation, and disposal. Custom elements provide an alternative syntax to the component binding for defining component tags.
SASS and SCSS are both CSS preprocessors that add features like variables, nesting, and mixins to regular CSS. SASS uses indentation for its syntax while SCSS uses brackets and semi-colons like regular CSS. SCSS was introduced as the new main syntax for Sass and is a superset of CSS, so any valid CSS is also valid SCSS. Both SASS and SCSS have the same features but SCSS has a more familiar syntax for CSS authors.
The child_process module provides several methods for spawning child processes from Node.js applications including exec, execFile, spawn, and fork. exec spawns a shell and runs a command, passing stdout and stderr to a callback. execFile is similar but spawns directly without a shell. spawn spawns a process and returns a ChildProcess object for sending/receiving messages. fork spawns a new Node.js process and allows sending messages between parent and child.
PM2 is a process manager for Node.js applications that allows keeping applications alive forever, reloading them without downtime, and facilitating common system admin tasks. It can start, stop, and restart processes, monitor CPU and memory usage, load balance processes, and automatically restart processes if they crash or exceed a memory limit. PM2 also provides a web interface and startup scripts to make processes automatically start on system restart.
The document discusses several topics related to programming including delegates, using statements, LINQ queries, parsing text files, and preventing SQL injection attacks. Key points covered include how to use delegates to handle variable processing logic, the using statement to ensure objects are disposed properly, comparing text in files using LINQ queries, and protecting against SQL injection by parameterizing queries.
This document provides information on various Git commands including git init, git config, git add, git reset, git commit, git log, git branch, git checkout, git merge, and others. It explains what each command does, such as git init creating an empty Git repository, git config setting user information, git add staging files, and git commit permanently storing file changes. It also covers basic branching and merging workflows.
The document discusses the basics of using the Vim text editor. It provides an overview of Vim's modes including normal mode commands like h, j, k, l for movement and dd for deleting lines. It also covers insert mode, command mode, and combining commands with quantities. Examples are given for deleting text ranges and repeating commands. The document recommends resources for learning more about Vim.
PostCSS is a tool for transforming CSS with JS plugins. It allows you to write CSS and use future CSS syntax now through plugins like Autoprefixer (which adds vendor prefixes), CSSnext (which supports CSS variables and mixins), and PreCSS (which allows Sass-like syntax). Other PostCSS plugins include postcss-sorting (to sort CSS rules), postcss-sprites (to generate image spritesheets), and CSS Modules (to scope CSS to components).
This document is a tutorial on React js that covers getting started with React, creating components, composing components with properties, adding Markdown, and hooking up components to a data model. It includes sections on your first component, React developer tools, using component properties, adding Markdown, and connecting components to data through multiple steps. The tutorial aims to teach developers how to build React applications.
Docker is an open platform for developing, shipping, and running applications. It enables separating applications from infrastructure so software can be delivered quickly. Docker uses features of the Linux kernel like namespaces and cgroups to deliver functionality. Containers are more lightweight than virtual machines, using less disk space and starting faster, while still providing isolation. Docker uses images and repositories to package and distribute applications. The Dockerfile defines how to build images from a base image and run commands.
Semantic UI is a front-end framework started in 2013 that helps create beautiful and responsive layouts using human-friendly HTML. It treats words and classes as exchangeable concepts, using syntax from natural languages for intuitive class names. Semantic UI includes tools for simplified debugging, intuitive JavaScript behaviors, and customizable themes through an installation process involving Node.js, Gulp, and included files. It has a folder structure for component types and supports custom themes, sitewide defaults, component defaults, and overrides.
The document discusses four categories of errors in Node.js - standard JavaScript errors, system errors from underlying OS constraints, user-specified errors from application code, and assertion errors from logic violations. It also covers how errors propagate and can be intercepted using try/catch blocks, callbacks, and EventEmitter events. Errors are handled asynchronously in Node.js and the Error class can be used to create new error objects.
The document discusses process control in Node.js using state machines, promises, and generators. It covers using EventEmitter to create a state machine that emits events. It explains how promises are used to handle asynchronous operations and avoid callback hell. Generators are used to pause and resume functions through the yield keyword.
Expression trees represent code in a tree-like data structure where each node is an expression. This enables dynamic modification of executable code, execution of LINQ queries in various databases, and creation of dynamic queries. Expression trees can be compiled into executable code using the Expression<TDelegate>.Compile() method.
CSS Flex Box Layout is a CSS3 web layout model that allows elements within a container to be automatically arranged and resized depending on screen size. It defines flex containers and flex items, with properties that control alignment, order, sizing, and distribution of space. Common flex properties include flex-direction, flex-wrap, justify-content, align-items, and properties for individual flex items like order, flex-grow, and align-self. Flexbox provides more flexible layout options compared to traditional CSS box model properties.
This document discusses ShowModalDialog for Chrome, which is a library that aims to provide modal dialog functionality for Chrome similar to IE's ShowModalDialog method. It covers Chrome and IE compatibility issues with modal dialogs and provides examples of using ShowModalDialog for Chrome, including customizing select options and accessing event handlers via jQuery. It also demonstrates using eval() to evaluate JavaScript expressions and executing code on document ready.
The document discusses Elasticsearch concepts and operations including:
1. Field datatypes in Elasticsearch including simple, hierarchical, and specialized types.
2. Search operations using GET and POST, and query syntax including query_string, bool, date range, and nested queries.
3. Additional query parameters like size, from, sort, filter, and aggregations to customize search results.
4. The scan and scroll API for efficiently retrieving large result sets.
Expression trees represent code in a tree-like data structure where each node is an expression. This enables dynamic modification of executable code, execution of LINQ queries in various databases, and creation of dynamic queries. Expression trees can be compiled into executable code using the Expression<TDelegate>.Compile() method.
D3.js is a JavaScript library for manipulating documents based on data. It allows binding data to the DOM and applying data-driven transformations. The document discusses using D3.js to create force-directed graphs by binding data to SVG elements like paths, circles, and text. Key aspects covered include the D3 force layout to simulate physical forces on nodes, and SVG attributes to define paths, circles, text position and styling.
This week's learning topics included:
1. Last week's homework on method overriding and the new keyword in C#.
2. LINQ exercises on Union, Concat, OrderBy, OrderByDescending, and where clauses.
3. Select and SelectMany LINQ projection operators to select values from collections and nested collections.
4. Javascript functions including direct declaration, anonymous functions, self-invoking anonymous functions, and closures which combine a function with its enclosing environment.
This document discusses software testing workflows and the Mocha testing framework. It describes unit testing, integration testing, and acceptance testing. It then provides documentation on using Mocha for unit testing, including installing Mocha with NPM, running tests, using hooks, and different assert methods. It also introduces the power-assert module for more descriptive assertion messages in Mocha tests.
R is a free and open-source programming language and software environment for statistical analysis, graphics, and statistical computing. It was originally developed in the 1990s at Bell Laboratories by statisticians John Chambers and colleagues. Key points about R include that it is an interpreted language, supports functional programming, and is object-oriented. R can be used for tasks like statistical analysis, data visualization, and machine learning. It has a large community of users and developers contributing packages for specialized analysis techniques.