Tutorial by Examples: e

Synopsis A fully functional demo of Firebase v3 Web authentication viewable here. Sign in with Facebook, Github, Google, Twitter, password based, and anonymous accounts. The code, available on Github, is easy to read and follow and is well documented. The focus is on the fully functional authent...
Here is a quick reference for advanced insertion, formatting, and filtering commands/shortcuts. Command/ShortcutResultg + ? + mPerform rot13 encoding, on movement mn + ctrl + a+n to number under cursorn + ctrl + x-n to number under cursorg + q+ mFormat lines of movement m to fixed width:rce wCenter...
A SIGABRT or an EXC_BAD_INSTRUCTION usually means the app crashed itself intentionally because some check failed. These should log a message to the debugger console with more information; check there for more information. Many SIGABRTs are caused by uncaught Objective-C exceptions. There are a lo...
EXC_BAD_ACCESS means the process tried to access memory in an invalid way, like dereferencing a NULL pointer or writing to read-only memory. This is the hardest kind of crash to debug, because it usually does not have an error message, and some crashes can be very difficult to reproduce and/or occu...
If you either have apps generated with pre-android support or just did that on purpose, you can always add android project to your app. $ react-native android This will generate android folder and index.android.js inside your app.
It is common for company to set up it's own nuget server for distribution of packages across different teams. Go to Solution Explorer and click Right Mouse button then choose Manage NuGet Packages for Solution In window that opens click on Settings Click on + in top right corner the...
A process can (try to) send a signal to any other process using the kill() function. To do so, the sending process needs to known the receiving process' PID. As, without introducing a race, a process can only be sure of its own PID (and the PIDs of its children) the most simple example to demonstra...
Given 2 lists var list1 = new List<string> { "a", "b", "c" }; var list2 = new List<string> { "1", "2", "3", "4" }; if you want to output all permutations you could use nested loops like var result = new List<s...
The following example shows how to set up Dependency Injection using Ninject as an IoC container. First add a CustomModule class to your WebJob project, and add any dependency bindings there. public class CustomModule : NinjectModule { public override void Load() { Bind<IMyI...
import pandas as pd import numpy as np import matplotlib.pyplot as plt # I want 7 days of 24 hours with 60 minutes each periods = 7 * 24 * 60 tidx = pd.date_range('2016-07-01', periods=periods, freq='T') # ^ ^ # | ...
Consider the following example: @sky-blue: #87ceeb; @dark-sky-blue: @sky-blue + #333; body { background-color: @dark-sky-blue; } The above example gives you: body { background-color: #baffff; } Here it explains how to declare a variable and also make operations on a particular va...
C++11 The std::is_same<T, T> type relation is used to compare two types. It will evaluate as boolean, true if the types are the same and false if otherwise. e.g. // Prints true on most x86 and x86_64 compilers. std::cout << std::is_same<int, int32_t>::value << "\n&qu...
C++11 There are a number of different type traits that compare more general types. Is Integral: Evaluates as true for all integer types int, char, long, unsigned int etc. std::cout << std::is_integral<int>::value << "\n"; // Prints true. std::cout << std::is_in...
C++11 Type properties compare the modifiers that can be placed upon different variables. The usefulness of these type traits is not always obvious. Note: The example below would only offer an improvement on a non-optimizing compiler. It is a simple a proof of concept, rather than complex example. ...
aiohttp provides asynchronous websockets. Python 3.x3.5 import asyncio from aiohttp import ClientSession with ClientSession() as session: async def hello_world(): websocket = await session.ws_connect("wss://echo.websocket.org") websocket.send_str("Hell...
aiohttp.ClientSession may be used as a parent for a custom WebSocket class. Python 3.x3.5 import asyncio from aiohttp import ClientSession class EchoWebSocket(ClientSession): URL = "wss://echo.websocket.org" def __init__(self): super().__init__() self....
6 In ECMAScript 6, when using the module syntax (import/export), each file becomes its own module with a private namespace. Top-level functions and variables do not pollute the global namespace. To expose functions, classes, and variables for other modules to import, you can use the export keyword....
Apart from types as a template parameter we are allowed to declare values of constant expressions meeting one of the following criteria: integral or enumeration type, pointer to object or pointer to function, lvalue reference to object or lvalue reference to function, pointer to member, st...
can either pass string of the json, or a filepath to a file with valid json In [99]: pd.read_json('[{"A": 1, "B": 2}, {"A": 3, "B": 4}]') Out[99]: A B 0 1 2 1 3 4 Alternatively to conserve memory: with open('test.json') as f: data = pd.Da...
def to_flare_json(df, filename): """Convert dataframe into nested JSON as in flare files used for D3.js""" flare = dict() d = {"name":"flare", "children": []} for index, row in df.iterrows(): parent = row[...

Page 573 of 1191