Tutorial by Examples: c

In the JNDI declaration you may want to encrypt the username and password. You have to implement a custom datasource factory in order to be able to decrypt the credentials. In server.xml replace factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" by factory="cypher.MyCustomDataS...
Interceptors are a good tool for implementing cross-cutting concerns such as logging or authentication. Let's say we have a following service: public interface IService { string CreateOrder(NetworkCredential credentials, Order orderToCreate); string DeleteOrder(NetworkCredential credenti...
For registration like this: var container = new WindsorContainer(); container.Register( Component.For<FirstInterceptor>(), Component.For<SecondInterceptor>(), Component.For<ThirdInterceptor>(), Component.For<IService>() .ImplementedBy<Servi...
Providing your microsoft account credentials you can authenticate and receive subscription keys to start with the services. This document describes the various flows in the tool to create your own knowledge base. QnA Maker works in three steps: extraction, training and publishing. To start, feed ...
To create a customization plugin, you simply create a class derived from CustomizationPlug and package it into customization. While the system is publishing customization project, it will execute the OnPublished and UpdateDatabase methods implemented in your customization plugin only within the curr...
I won't repeat it all here: "Application Default Credentials provide a simple way to get authorization credentials for use calling Google APIs." If you can use Application Default Credentials, do. There is an extra step you will need to perform the before first using Application Default ...
Once you become familiar with the code to call one method on one Google service, you will be able to infer how to call any method on any Google service. First, we make a connection to the service using the credential object instantiated in the previous example: CloudResourceManagerService service ...
The following 4 properties are available for PXSelector and PXSegmentMask input controls to define size range for a drop-down window: MinDropWidth: gets or sets the minimum drop-down control width MinDropHeight: gets or sets the minimum drop-down control height MaxDropWidth: gets or sets the ma...
button.Click +=async delegate { var MScanner = new MobileBarcodeScanner(); var Result = await MScanner.Scan(); if(Result == null) { return; } //get the bar code text here string BarcodeText = Result.text; }
Interceptors are registered like regular components in Windsor. Like other components, they can depend on another components. With following service for validating credentials: public interface ICredentialsVerifier { bool IsAuthorizedForService(NetworkCredential credentials); } public cl...
Say we have a Product class with Multiple Colors which can be on many Products. public class Product { public int ProductId { get; set; } public ICollection<ColorProduct> ColorProducts { get; set; } } public class ColorProduct { public int ProductId { get; set; } ...
In this topic we will base on this table of users : CREATE TABLE sch_test.user_table ( id serial NOT NULL, username character varying, pass character varying, first_name character varying(30), last_name character varying(30), CONSTRAINT user_table_pkey PRIMARY KEY (id) ) +---...
public class BitmapTools { /// <summary> /// Gets the cropped bitmap asynchronously. /// </summary> /// <param name="originalImage">The original image.</param> /// <param name="startPoint">The start ...
<# .SYNOPSIS Gets the content of an INI file. .DESCRIPTION Gets the content of an INI file and returns it as a hashtable. .INPUTS System.String .OUTPUTS System.Collections.Hashtable .PARAMETER FilePath Specifies the path to the input INI file. .EXAMPLE ...
<# .SYNOPSIS Reads a CSV file and filters it. .DESCRIPTION The ReadUsersCsv.ps1 script reads a CSV file and filters it on the 'UserName' column. .PARAMETER Path Specifies the path of the CSV input file. .INPUTS None. You cannot pipe objects to ReadUsersCsv.ps1. ...
So what we will try to do is to compile a following function int sum(int a, int b) { return a + b + 2; } on the fly. And here's the entire .cpp example: #include <iostream> #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" #include "llvm/IR/I...
When a Bash project turns into a library, it can become difficult to add new functionality. Function names, variables and parameters usually need to be changed in the scripts that utilize them. In scenarios like this, it is helpful to decouple the code and use an event driven design pattern. In said...
The following VHDL model drives signal s from two different processes. As the type of s is bit, an unresolved type, this is not allowed. -- File md.vhd entity md is end entity md; architecture arc of md is signal s: bit; begin p1: process begin s <= '0'; wait; e...
A signal which type is resolved has an associated resolution function. It can be driven by more than one VHDL process. The resolution function is called to compute the resulting value whenever a driver assigns a new value. A resolution function is a pure function that takes one parameter and return...
Some very simple and low cost hardware devices, like sensors, use a one-bit communication protocol. A single bi-directional data line connects the device to a kind of micro-controller. It is frequently pulled up by a pull-up resistor. The communicating devices drive the line low for a pre-defined du...

Page 742 of 826