Tutorial by Examples: c

USE TDE CREATE DATABASE ENCRYPTION KEY WITH ALGORITHM = AES_256 ENCRYPTION BY SERVER CERTIFICATE My_New_Cert GO ALTER DATABASE TDE SET ENCRYPTION ON GO This uses 'Transparent Data Encryption' (TDE)
-- Create the key and protect it with the cert CREATE SYMMETRIC KEY My_Sym_Key WITH ALGORITHM = AES_256 ENCRYPTION BY CERTIFICATE My_New_Cert; GO -- open the key OPEN SYMMETRIC KEY My_Sym_Key DECRYPTION BY CERTIFICATE My_New_Cert; -- Encrypt SELECT EncryptByKey(Key_GUID('SSN_Key_01'),...
This function gets existing item form cache, and if the item don't exist in cache, it will fetch item based on the valueFetchFactory function. public static TValue GetExistingOrAdd<TValue>(string key, double minutesForExpiration, Func<TValue> valueFetchFactory) { ...
A common pattern in other languages is having a function that produces a "stream" of objects, and being able to use loop-code to loop over it. We can model this in C++ as template<class T> struct generator_iterator { using difference_type=std::ptrdiff_t; using value_type=T; ...
Laravel automatically resolves Eloquent models defined in routes or controller actions whose variable names match a route segment name. For example: Route::get('api/users/{user}', function (App\User $user) { return $user->email; }); In this example, since the Eloquent $user variable de...
To register an explicit binding, use the router's model method to specify the class for a given parameter. You should define your explicit model bindings in the boot method of the RouteServiceProvider class public function boot() { parent::boot(); Route::model('user', App\User::class); ...
By definition: Services are basically constructor functions. They use ‘this’ keyword. Factories are simple functions hence return an object. Under the hood: Factories internally calls provider function. Services internally calls Factory function. Debate: Factories can run code before we retur...
Given these sample data: IDSTATUSSTATUS_TIMESTATUS_BY1ONE2016-09-28-19.47.52.501398USER_13ONE2016-09-28-19.47.52.501511USER_21THREE2016-09-28-19.47.52.501517USER_33TWO2016-09-28-19.47.52.501521USER_23THREE2016-09-28-19.47.52.501524USER_4 Items identified by ID values must move from STATUS 'ONE' to...
Translate translate moves graphics along specified vectors: <circle cx="0" cy="0" r="50" transform="translate(50,50)"/> The first value is the x translation, and the second the y. If the y is omitted, it will default to 0. Scale scale resizes elem...
Deferred execution enables combining different operations to build the final query, before evaluating the values: var list = new List<int>() {1,1,2,3,5,8}; var query = list.Select(x => x + 1); If we execute the query at this point: foreach (var x in query) { Console.Write($"...
With deferred execution, if the data to be queried is changed, the query object uses the data at the time of execution, not at the time of definition. var data = new List<int>() {2, 4, 6, 8}; var query = data.Select(x => x * x); If we execute the query at this point with an immediate m...
0.6.0-dev In Julia v0.6 and later, command macros are supported in addition to regular string macros. A command macro invocation like mymacro`xyz` gets parsed as the macro call @mymacro_cmd "xyz" Note that this is similar to string macros, except with _cmd instead of _str. We typ...
public class RedisSubscriber extends RouteBuilder { @Value("${redis.host}") private String redisHost; @Value("${redis.port}") private int redisPort; @Value("${redis.channel.mychannel}") private String redisChannel; private Object b...
<bean id="managedCamel" class="com.pubsub.example.ManagedCamel" > <constructor-arg name="routes"> <list> <ref bean="redisSubscriber"/> </list> </constructor-arg> </bean> &lt...
<bean id="managedCamel" class="com.pubSub.example.ManagedCamel" > <constructor-arg name="routes"> <list> <ref bean="redisPublisher"/> </list> </constructor-arg> </bean> <...
public class ManagedCamel implements Managed { public static final String REDIS_TEMPLATE = "redisTemplate"; public static final String LISTENER_CONTAINER = "listenerContainer"; public static final String REDIS_SERIALIZER = "redisSerializer"; privat...
By Creating Custom Progress Dialog class, the dialog can be used to show in UI instance, without recreating the dialog. First Create a Custom Progress Dialog Class. CustomProgress.java public class CustomProgress { public static CustomProgress customProgress = null; private Dialog m...
All instances (objects) of an entity class can be loaded from the underlying database table as follows (akin to retrieving all rows from the table): Iterable<Foo> foos = fooRepository.findAll(); The findAll method is provided by the CrudRepository interface. It returns an Iterable instead ...
A particular instance of an entity class can be loaded as follows: Foo foo = fooRepository.findOne(id); The findOne method is provided by the CrudRepository interface. It expects an identifier that uniquely identifies an entity instance (for instance, a primary key in a database table). The Java...
All instances of an entity class with one of the class attributes matching a specified value can be retrieved as follows: public interface FooRepository extends CrudRepository<Foo, Long> { List<Foo> findAllByName(String name); } Invoking the findAllByName method results in the JP...

Page 594 of 826