Tutorial by Examples: c

set var1=123456789 set var2=abcdef call :specialvars echo %var1%, %var2% rem More code... :specialvars setlocal set var1=987654321 set var2=fedcba endlocal goto :eof When inside the section setlocal , endlocal section, variables are seperate from the caller's variables, hence why %var...
set importantvar=importantstuff call :stuff 123 var1 rem More code... :stuff <arg1> <arg2> setlocal set importantvar=%~1 echo Writing some stuff into %~2! endlocal set %~2=some stuff setlocal set importantvar=junk endlocal goto :eof This utilizes the basic function, setl...
@Component public class RestExceptionResolver extends ExceptionHandlerExceptionResolver { @Autowired //If you have multiple handlers make this a list of handlers private RestExceptionHandler restExceptionHandler; /** * This resolver needs to be injected because it is the...
Wanted version for C and C++ can be specified globally using respectively variables CMAKE_C_STANDARD (accepted values are 98, 99 and 11) and CMAKE_CXX_STANDARD (accepted values are 98, 11 and 14): set(CMAKE_C_STANDARD 99) set(CMAKE_CXX_STANDARD 11) These will add the needed compile options on t...
v-for can be used for iterating over an object keys (and values): HTML: <div v-for="(value, key) in object"> {{ key }} : {{ value }} </div> Script: new Vue({ el: '#repeat-object', data: { object: { FirstName: 'John', LastName: 'Doe', Ag...
Service broker is technology based on asyncronous communication between two(or more) entities. Service broker consists of: message types, contracts, queues, services, routes, and at least instance endpoints More: https://msdn.microsoft.com/en-us/library/bb522893.aspx
ALTER DATABASE [MyDatabase] SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE;
USE [MyDatabase] CREATE MESSAGE TYPE [//initiator] VALIDATION = WELL_FORMED_XML; GO CREATE CONTRACT [//call/contract] ( [//initiator] SENT BY INITIATOR ) GO CREATE QUEUE InitiatorQueue; GO CREATE QUEUE TargetQueue; GO CREATE SERVICE InitiatorService ON QUEUE...
For this demonstration we will use service broker construction created in another part of this documentation. Mentioned part is named 3. Create basic service broker construction on database (single database communication). USE [MyDatabase] DECLARE @ch uniqueidentifier = NEWID() DECLARE @msg XML...
For this demonstration we will use service broker construction created in another part of this documentation. Mentioned part is called 3. Create basic service broker construction on database (single database communication). First we need to create a procedure that is able to read and process data f...
Yarn can check the licenses of your dependencies and can also generate a license based on your package's dependencies. yarn licenses yarn licenses generate
yarn why package-name will identify why a package is installed and which other packages depend upon it. yarn why react
Almost any controller needs some external dependencies to work. Here is a way to configure a dependency object (or its factory) and pass it to a controller. Doing so will help to sustain a separation of concerns, keep code clear and testable. Say, we have an interface and its implementation that...
BeautifulSoup allows you to filter results by providing a function to find_all and similar functions. This can be useful for complex filters as well as a tool for code reuse. Basic usage Define a function that takes an element as its only argument. The function should return True if the argument m...
Lets first understand the problem, consider this figure- We want to calculate ϴ, where we know A, B & O. Now, if we want to get ϴ, we need to find out α and β first. For any straight line, we know- y = m * x + c Let- A = (ax, ay), B = (bx, by), and O = (ox, oy). So for the line OA- oy =...
Content Negotiation can be defined as the process of selecting best representation for a given resource. So Content negotiation means the client and server can negotiate between them so that client can get data according to their required format. There are three points on which internet depends, ...
ls() includes a type flag, which lets you find scene nodes of a particular type. For example: cameras = cmds.ls(type='camera') // [u'topShape', u'sideShape', u'perspShape', u'frontShape'] You can search for multiple types in the same call: geometry = cmds.ls(type=('mesh', 'nurbsCurve', 'nu...
/** * Runs user-specified code when the given javascript object is garbage collected */ template<class CALLBACK_FUNCTION> void global_set_weak(v8::Isolate * isolate, const v8::Local<v8::Object> & javascript_object, CALLBACK_FUNCTION function) { struct SetWeakCallbackData{...
By implementing your custom IScopeAccessor you can create different types of scopes. For the following example I have the two classes Foo and Bar in which Bar will be registered with a custom LifeStyle. Each have an Id to assist with testing public class Foo { public Guid FooId { get; } = G...
Define a new basic command A macro can be defined using \newcommand. For example: \newcommand{\foo}{Just foo, you see?} defines a macro \foo that expands to Just foo, you see?. It can then be used like any built-in command, for example after that definition: He said: ``\foo'' expands to He...

Page 628 of 826