Tutorial by Examples

Unlike most other JavaScript objects, symbols are not automatically converted into a string when performing concatenation. let apple = Symbol('Apple') + ''; // throws TypeError! Instead, they have to be explicitly converted into a string when necessary, (for example, to get a textual description...
Server-Side JavaScript Native JSON Samplestack Sample Application Temporal Documents REST Management API Improvements More Semantics Features, Including SPARQL 1.1, Inferencing, and SPARQL UPDATE Node.js Client API REST and Java Client API Improvements Enhanced HTTP Server Features Flexi...
The Symbol.for method allows you to register and look up global symbols by name. The first time it is called with a given key, it creates a new symbol and adds it to the registry. let a = Symbol.for('A'); The next time you call Symbol.for('A'), the same symbol will be returned instead of a new o...
For more complex applications, flat execution profiles may be difficult to follow. This is why many profiling tools also generate some form of annotated callgraph information. gperf2dot converts text output from many profilers (Linux perf, callgrind, oprofile etc.) into a callgraph diagram. You can...
Google Perf Tools also provides a CPU profiler, with a slightly friendlier interface. To use it: Install Google Perf Tools Compile your code as usual Add the libprofiler profiler library to your library load path at runtime Use pprof to generate a flat execution profile, or a callgraph diagram...
The | can be used to have a single case statement match against multiple inputs to yield the same result: def f(str: String): String = str match { case "foo" | "bar" => "Matched!" case _ => "No match." } f("foo") // res0: String = M...
Given the following List of tuples: val pastries = List(("Chocolate Cupcake", 2.50), ("Vanilla Cupcake", 2.25), ("Plain Muffin", 3.25)) Pattern matching can be used to handle each element differently: pastries foreach { pa...
This is an example of an implementation of the identity monad in JavaScript, and could serve as a starting point to create other monads. Based on the conference by Douglas Crockford on monads and gonads Using this approach reusing your functions will be easier because of the flexibility this monad...
Bootstrapping Magento by calling: require_once 'app/Mage.php'; Mage::app(); // Your code This is the simplest way but not really the Magento way because we're not using class that extends Mage_Shell_Abstract - the class which when extended provides us with tools to parse command line arguments...
Magento way File resides in shell/custom.php <?php require_once' abstract.php'; class Stackoverflow_Shell_Custom extends Mage_Shell_Abstract { protected $_argname = array(); public function __construct() { parent::__construct(); // Time limit to infinity ...
The std::nth_element algorithm takes three iterators: an iterator to the beginning, nth position, and end. Once the function returns, the nth element (by order) will be the nth smallest element. (The function has more elaborate overloads, e.g., some taking comparison functors; see the above link for...
.exr -1 gives you details about the last exception thrown. !analyze -v usually does a good job as well. For .NET, the command !pe of the SOS extension shows details about the .NET exception that was thrown.
Hosted XSLT 2.0 Setup To run XSLT 2.0 in the browser, use one of the following XSLT 2.0 as a service hosts: XSLT Fiddle W3C XSLT Servlet Online XSLT Test Tool

SOS

SOS (son of strike) is the official WinDbg extension from Microsoft for .NET. It gets installed as part of the .NET framework and thus is available by default. Like any extension, it can be loaded using .load x:\full\path\to\sos.dll, but there are easier ways. Depending on the version of .NET, the ...
SOSex is an extension to SOS, written by Steve Johnson, a Microsoft employee. He provides SOSex for download for free, but it's not open source. Typically, the extension is not available side by side to any other DLL, so it is usually loaded with .load x:\full\path\to\sosex.dll. Besides simplifyin...
PyKD is a WinDbg extension that enables you writing Python scripts. It's open source. Typically, the extension is not available side by side to any other DLL, so it is usually loaded with .load x:\full\path\to\pykd.pyd, where PYD is the extension for a python DLL, but you can rename it to DLL if yo...
NetExt is an extension for .NET which provides LINQ-like queries for objects on the heap (!wselect, !wfrom) display capabilities for special objects like dictionaries and hash tables (!wdict, !whash) ASP.NET / HTTP related commands (!wcookie, !wruntime, !whttp) several other network related co...
Print the path to the active developer directory (selected Xcode) xcode-select -p Select a different version of Xcode, e.g. Beta sudo xcode-select -s /Applications/Xcode-beta.app Reset to the default version of Xcode sudo xcode-select -r This is equivalent to running sudo xcode-select -s /Appl...
An incomplete list of WinDbg extensions that are not installed with WinDbg itself: ExtensionPurposeSOS.NET (official Microsoft extension)SOSex.NET (extension for SOS)CoSOS.NET (extension for SOS)NetExt.NET (with focus on networking)PyKDPython scriptingPDEWindows native and store applications (stowe...
CoSOS (cousin of SOS) is an open source extension for WinDbg focusing on .NET memory fragmentation (!gcview) and threading issues (!wfo, !tn). Typically, the extension is not available side by side to any other DLL, so it is usually loaded with .load x:\full\path\to\cosos.dll. It requires that SOS ...

Page 751 of 1336