Tutorial by Examples: c

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...
When your app crashes, Xcode will enter the debugger and show you more information about the crash: The most important parts are: The red arrow The red arrow displays which line of code crashed & why it crashed. The debugger console Many crashes log more information to the debugger consol...
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...
Mixins are similar to defining and calling functions. Say, if we need to create a repetitive style, mixins are handy. Mixins may or may not take parameters. For e.g.: .default-round-borders { border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; } .round-b...
In Less, unlike Sass or Shell, the variables are declared by having names starting with a @ symbol. For example: @sky-blue: #87ceeb; body { background-color: @sky-blue; } The above example gives you: body { background-color: #87ceeb; } Here it explains how to declare a variable an...
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...
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....
The C++11 standard is a major extension to the C++ standard. Below you can find an overview of the changes as they have been grouped on the isocpp FAQ with links to more detailed documentation. Language Extensions General Features auto decltype Range-for statement Initializer lists Uniform ...
By default, npm installs the latest available version of modules according to each dependencies' semantic version. This can be problematic if a module author doesn't adhere to semver and introduces breaking changes in a module update, for example. To lock down each dependencies' version (and the ve...
There are two ways to create object mocked by Mockito: via annotation via mock function Via annotation: With a JUnit test runner: @RunWith(MockitoJUnitRunner.class) public class FooTest { @Mock private Bar barMock; // ... } You can also use Mockito's JUnit @Rule, which...
Mockito.when(mock.returnSomething()).thenReturn("my val"); mock.returnSomething(); // returns "my val" mock.returnSomething(); // returns "my val" again mock.returnSomething(); // returns "my val" again and again and again... If you want different valu...
There have been many releases of Java since the original Java 1.0 release in 1995. (Refer to Java version history for a summary.) However most releases have passed their official End Of Life dates. This means that the vendor (typically Oracle now) has ceased new development for the release, and n...
One method for creating recursive lambda functions involves assigning the function to a variable and then referencing that variable within the function itself. A common example of this is the recursive calculation of the factorial of a number - such as shown in the following code: lambda_factorial ...

Page 402 of 826